It just means raw string in Python. Meaning that whatever is inside the string, is the string. For example, if you wanted to add slashes:
string1 = "happy\/cheese"
You would need to add \
in front of the slash since its an escaping character. For example, \n
means a new line.
If you keep the string raw, it makes sure that whatever is in the string is not interpreted a special way. for example if you wrote string2 = r"\n"
, it would just give you "\n"
as you string, and not a new line.
You can learn more about them, from here.
Now, this is done in your case, because file paths have a lot of slashes, and we'd like to avoid having to put in so many backslashes.