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
| Posted By - | Karan Gupta |
| |
| Posted On - | Monday, April 29, 2019 |