I want to convert a string, which contains a file path, to a raw string, so the '\' characters are not considered escapes.
folderList = os.listdir(folderPath)
# folderList is a list of files, path = folderPath + (element of folderList)
So if I'm using something like this in Python 3, can I convert path to a raw string? I've tried using the encode method for strings, but that does not work. Also, I am not looking for solutions to replace the string '\' with '\'. I feel this process would take too long for how many paths I would have to process. So are there any simple conversions to convert path into a raw string?