Python Notes With Practical Codes
Literals
● It is rule to define the values of identifiers
1] Numeric Literals
Example :
Code:
a= 100
b= 20.366554677
c= 2 +3j
> We can give all the above values, called Integer, Float, and Complex, to the variable
These are called the numeric literals
2] String Literals
Example :
Code :
S = ‘nikhil’
S = “nikhil”
S = ‘’’nikhil’’’
> We can write the string in single, Double, and Triple codes format in python so this is
Called as string literals