I have a string which is a Windows path returned by another function. The function returns the path with a single backslash within it. Here I can't using raw string conversion to a variable. re.escape(path)
does not work either. path.replace('\','\\')
throws SyntaxError: unexpected character after line continuation character
The function returns a path something like "D:\Data\201909\Foo\20190927c\Files"
which gets coverted into "D:\\Data\ü909\\Foo\x8190927c\\Files"
path
can be assumed as the variable containing the value returned by the function.
Could you please suggest me a solution for this.
Thanks Much !