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 {} {}"
= "This is {0} {1} "
= a.format(me, a2)
# print(b)

# third method with the help of f string
= f"hy, You {me} a {a2} {23-23} {math.sin(90)}"
print(z)

Comments