python string format number code example
Example 1: python string format
print("My name is {0} and I am {1} years old".format(name, age))
Example 2: python integer to string format
'{:d}'.format(42)
print("My name is {0} and I am {1} years old".format(name, age))
'{:d}'.format(42)