F string in python
# formating string
import math
# first method
me = "Umair"
a2 = "New comer"
# print("This is the first method of formating....%s..%s"%(a2,me))
# Second method
# a = "This is {} {}"
a = "This is {0} {1} "
b = a.format(me, a2)
# print(b)
# third method with the help of f string
z = f"hy, You {me} a {a2} {23-23} {math.sin(90)}"
print(z)
Comments
Post a Comment