Wednesday, 3 July 2019

Escape Sequences

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

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(...