def example_cheater(color, flavor, age):
template = 'I am {age} years old and I like to wear {color} hats and eat {flavor} icecream'
return template.format(**locals())
Obviously a contrived example, and it can be argued that using locals() is not very pythonic, but I think it makes the code look much nicer.