I have a string:
C:\\tmp\\files\\file.xxx
How do I remove only one \?
End results:
C:\tmp\files\file.xxx
I have a string:
C:\\tmp\\files\\file.xxx
How do I remove only one \?
End results:
C:\tmp\files\file.xxx
You might want to look at Python’s os.path module
Though if you would like to replace \\ with \, please do something like,
str = "C:\\tmp\\files\\file.xxx";
print str;
Output of above code will be,
C:\tmp\files\file.xxx
I've tested this code over here and it is working.