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

Como escuchar la rock and pop desde Ubuntu

Adopción de ap unifi cuando el comando set-inform no aparece en el ap por ssh - docker controller