Articles → Python → Escape sequence in python

Escape sequence in python






Escape sequence




Escape SequencePurpose
\nNew line
\\‘\’ – Slash
\’Single quote
\”Double quote
\tTab



Example


print("This is first line \nThis is second line")
print("Double slash  - \\")
print("Single Quote  - \'")
print("Double Quote  - \"")
print("Tab  - \tText after tab")



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, April 29, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250