In Python, it is tedious to write:
print \"foo is\" + bar + \'.\'
Can I do something like this in Python?
print \"foo is #{ba
I prefer this approach because you don't have to repeat yourself by referencing the variable twice:
alpha = 123 print 'The answer is {alpha}'.format(**locals())