# using format() method print('I love {} for "{}!"'.format('Geeks', 'Geeks')) # using format() method and refering # a position of the object print('{0} and {1}'.format('Geeks', 'Portal')) print('{1} and {0}'.format('Geeks', 'Portal'))
print('{} {}'.format(1, 2))
print(f'I love {Geeks} from {Portal}')
print('{} {}'.format('one', 'two'))
'{} {}'.format('one', 'two')
'{:10.5}'.format('xylophone')