Articles → Python → Escape Sequence In Python
Escape Sequence In Python
Escape Sequence
Escape Sequence | Purpose |
---|
\n | New line |
\\ | ‘\’ – Slash |
\’ | Single quote |
\” | Double quote |
\t | Tab |
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