Ch 11 string formatting
name="ankit"
age = 24
Print("hello"+name+"your age is"+(str(age))
# ugly syntax in this way your code is look very missy
But u want to use this syntax to show your code look nice
name ="ankit"
age = 12
print(f"hello{name}your age is{age}")
# the f is impo to use this syntax
Comments
Post a Comment