formatting strings in python
age = 11
my_self = "My name is Vishnu, I am " + str(age)
print(my_self)
formatting strings in python
age = 11
my_self = "My name is Vishnu, I am " + str(age)
print(my_self)
print python format
print('{} {}'.format(1, 2))
python format string
>>> 'Coordinates: {latitude}, {longitude}'.format(latitude='37.24N', longitude='-115.81W')
'Coordinates: 37.24N, -115.81W'
>>> coord = {'latitude': '37.24N', 'longitude': '-115.81W'}
>>> 'Coordinates: {latitude}, {longitude}'.format(**coord)
'Coordinates: 37.24N, -115.81W'
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us