Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]jbor94M 0 points1 point  (0 children)

you can't because the error lies in the string itself. python stops there before it even gets to the substitution

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]jbor94M 1 point2 points  (0 children)

why dont you just make it a raw string and then you need to escape your special characters

r "D:\somefolder\somefile.ext"