Escaping Charecters in python

Just an example commonly used
Escaping the "\" with another "\"

>>> with open('C:\\Folder1\\Folder2\\file') as file_handler:
Or just add an "r" before the path (this stands for "raw").

>>> with open(r'C:\Folder1\Folder2\file') as file_handler:

Comments

Popular posts from this blog

Como configurar el control de directv para que funcione con el Tv

Las Tutucas y todo lo demás

Python Ipdb Cheatsheet