When i write the following line of code
filename = 'E:\project\genres\blues\blues.00000.au'
I get the output as
'E:\\project\\genres\x08lues\x08lues.00000.au'
Why is 'b' from blues replaced by x08? And how can I solve this problem?
When i write the following line of code
filename = 'E:\project\genres\blues\blues.00000.au'
I get the output as
'E:\\project\\genres\x08lues\x08lues.00000.au'
Why is 'b' from blues replaced by x08? And how can I solve this problem?
\b
is interpreted as backspace (much like \n
is new line and \t
is tab). See list of ASCII control characters. \x08
is the unicode representation of \b
.
You need to either:
Use double slashes
filename = 'E:\\project\\genres\\blues\\blues.00000.au'
Use forward slashes (Yes, these work on Windows)
filename = 'E:/project/genres/blues/blues.00000.au'
Use a raw-string literal
filename = r'E:\project\genres\blues\blues.00000.au'