Escape sequence in Python

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:

print 'a' 
print 'tHermit'
print "i know , they are 'great'"

The output is as follows:

C:pydev>python hello.py
Hermit
i know , they are 'great'

The preceding code executes with a beep sound. If you did not hear the beep sound, check your speakers.