Ririn
0
Q:

python escape character

#The backslash \ character has special meaning in python strings
#for example \n changes the line
print("First line text\n Second line text)

#other uses:
\'	Single Quote	
\\	Backslash	
\r	Carriage Return	
\t	Tab	
\b	Backspace	
\f	Form Feed	
\ooo	Octal value	
\xhh	Hex value

#To use it as a literal backslash character use raw strings like this:
print(r"C\Users\MyName\Desktop")
2
\'	Single Quote	
\\	Backslash
newline = '\n'
2
newline = '\n'
quote = '\'\"'
tab = '\t'
backslash = '\\'
1

New to Communities?

Join the community