1Name = 'Tame Tamir'
2Age = 14
3
4Formatted_string = 'Hello, my name is {name}, I am {age} years old.'.format(name=Name,age=Age)
5# after the formatting, the variable name inside the {} will be replaced by whatever you declare in the .format() part.
6print(Formatted_string) # output = Hello, my name is Tame Tamir, I am 14 years old.
1>>> 'Coordinates: {latitude}, {longitude}'.format(latitude='37.24N', longitude='-115.81W')
2'Coordinates: 37.24N, -115.81W'
3>>> coord = {'latitude': '37.24N', 'longitude': '-115.81W'}
4>>> 'Coordinates: {latitude}, {longitude}'.format(**coord)
5'Coordinates: 37.24N, -115.81W'
6