strng format code example Example 1: format on str '{} {}'.format('one', 'two') Example 2: format on str '{:10.5}'.format('xylophone')