May 2017
Intermediate to advanced
280 pages
6h 2m
English
The escape sequence is used to insert the tab, the newline, the backspace, and other special characters into your code. They give you greater control and flexibility to format your statements and code:
| Escape | Sequence Meaning |
|---|---|
| b | Backspace |
| a | Sound system bell |
| n | Newline |
| t | Horizontal tab |
| The character | |
| ' | Single quotation mark |
| " | Double quotation mark |
print 'a' print 'tHermit' print "i know , they are 'great'"
The output is as follows:
C:pydev>python hello.pyHermiti know , they are 'great'
The preceding code executes with a beep sound. If you did not hear the beep sound, check your speakers.
Read now
Unlock full access