I checked all Stackoverflow questions on this matter and none can answer my problem.I need to convert \\ to \.
Edited:
This is what I am trying:
>>> a = b'\xe5jb\x8c?Q$\xf3\x1d\x97^\xfa3O\xa6U.txt'
>>> b = str(a)
>>> b
"b'\\xe5jb\\x8c?Q$\\xf3\\x1d\\x97^\\xfa3O\\xa6U.txt'"
>>> b = b.replace('b\'','')
>>> b = b[:len(b)-1]
>>> b
'\\xe5jb\\x8c?Q$\\xf3\\x1d\\x97^\\xfa3O\\xa6U.txt'
>>> c = bytes(b,'utf8')
>>> c
b'\\xe5jb\\x8c?Q$\\xf3\\x1d\\x97^\\xfa3O\\xa6U.txt'
>>> a == c
False
How do I make a==c True? I tried
.replace("\\\\","\\")
but this doesn't help. The string remains the same. I need to store the byte in variable 'a' to a file as a text and call it back. Python-3.8, Windows=10