python forward and bachward seperators code example
Example 1: python forward and bachward seperators
import os
path = "C:\\temp\myFolder\example\\"
newPath = path.replace(os.sep, '/')
print newPath
Output:<< C:/temp/myFolder/example/ >>
Example 2: python forward and bachward seperators
s.replace('\\', '/')
Example 3: python forward and bachward seperators
os.path.join(*s.split('\\'))
Example 4: python forward and bachward seperators
posixpath.join(*s.split('\\'))