Parsing a mix of Backward slash and forward slash in a filename

use r before the string to process it as a raw string (i.e. no string formatting).

e.g.

infilename = r'C:/blah/blah/blah.csv'

More details here:
https://docs.python.org/3.6/reference/lexical_analysis.html#string-and-bytes-literals

Leave a Comment