>>> str1 = 'foo'
>>> str2 = 'bar'
>>> new_str = ' - '.join((str1, str2))
>>> new_str
'foo - bar'
>>> new_str = '{} - {}'.format(str1, str2)
>>> new_str
'foo - bar'
>>> new_str = '%s - %s' % (str1, str2)
>>> new_str
'foo - bar'
>>> from timeit import timeit
>>> def f1(s1='foo', s2='bar'):
return ' - '.join((s1, s2))
>>> f1()
'foo - bar'
>>> def f2(s1='foo', s2='bar'):
return '{0} - {1}'.format(s1, s2)
>>> f2()
'foo - bar'
>>> def f3(s1='foo', s2='bar'):
return '%s - %s' % (s1, s2)
>>> f3()
'foo - bar'
>>> timeit(f1)
0.7238124336211288
>>> timeit(f2)
1.3038862714413124
>>> timeit(f3)
0.8215918286469828