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


Picture showing the output of Escape sequence in python



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

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250