What\'s a nice idiom to do this:
Instead of: print \"%s is a %s %s that %s\" % (name, adjective, noun, verb)
print \"%s is a %s %s that %s\" % (name, adjective, noun, verb)
I want to be able to do something to th
use string.Template
>>> from string import Template >>> t = Template("$name is a $adjective $noun that $verb") >>> t.substitute(name="Lionel", adjective="awesome", noun="dude", verb="snores") 'Lionel is a awesome dude that snores'