Escape Sequences:
Escape sequences begin with escape character (Backslash characters)
Backslash
  character 
 | 
  
Name 
 | 
  
Meaning 
 | 
 
‘\n’ 
 | 
  
New
  Line character 
 | 
  
Moves
  to next line 
 | 
 
‘\t’ 
 | 
  
Tabular
  space 
 | 
  
Gives
  space 
 | 
 
‘\a’ 
 | 
  
Alarm 
 | 
  
Beep 
 | 
 
‘\b’ 
 | 
  
Backspaces 
 | 
  
Moves
  to previous space 
 | 
 
‘\\’ 
 | 
  
Single
  quote backslash 
 | 
  
Gives
  single backslash 
 | 
 
‘\r’ 
 | 
  
Carriage
  return 
 | 
  
Carriage
  returns 
 | 
 
“\”” 
 | 
  
Double
  quote 
 | 
  
It
  prints double quote 
 | 
 
Ex:
>>> print("Vij\nHyd")
Vij
Hyd
>>> print("Vij\tHyd")
Vij     Hyd
>>>
Youtube channel click here to see this video
Next Topic: Python identifier
Previous Topic: Comment Lines in Python
You may like the following posts:
No comments:
Post a Comment