Quantcast
Channel: Why is the syntax different when locating two files of the same type, in the same directory? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Jonathan Feenstra for Why is the syntax different when locating two files of the same type, in the same directory?

$
0
0

The backslash ('\') is the escape character for strings in Python. '\u' starts a 16-bit hex value Unicode escape for the next four characters. You could use a raw string r"login\usernames.txt" or double backslashes "login\\usernames.txt" instead, but using normal slashes ('/') is recommended since this also works on Linux unlike backslashes.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>