So i've tried the formats string methods in python but what are the differences between them? Which method is best for me?
example1:
name = 'Dash'
print(f'Hello {name}!')
example2:
name = 'Dash'
print('Hello {}!'.format(name))
So i've tried the formats string methods in python but what are the differences between them? Which method is best for me?
example1:
name = 'Dash'
print(f'Hello {name}!')
example2:
name = 'Dash'
print('Hello {}!'.format(name))