So I have following problem:
"L:\GDrive\test\img.png".replace(os.sep, '/')
returning
"L:/GDrive\test/img.png"
Is there a way to replace all \ characters without manually going over all possible special symbols like \t? Need to preserve t of course.
>Solution :
try use "r" before the path:
r"L:\GDrive\test\img.png".replace(os.sep, '/')
output:
'L:/GDrive/test/img.png'