print('My name is {} {}.'.format('Taro', 'Tanaka'))
print('My name is {0} {1}.'
'Watashi ha {1} {0}'.format('Taro', 'Tanaka'))
print('My name is {name} {family}.'
'Watashi ha {family} {name}'.format(name='Taro', family='Tanaka'))
実行結果:
My name is Taro Tanaka.
My name is Taro Tanaka.Watashi ha Tanaka Taro
My name is Taro Tanaka.Watashi ha Tanaka Taro