Skip to content

Instantly share code, notes, and snippets.

@jeremyBanks
Created August 5, 2008 08:43
Show Gist options
  • Save jeremyBanks/4044 to your computer and use it in GitHub Desktop.
Save jeremyBanks/4044 to your computer and use it in GitHub Desktop.
[2010-01] "There's a string.Template? What's that do?"
#!/usr/bin/env python
from string import Template
t = 45
s = "test"
print Template("We have $t ${s}s.").substitute(locals())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment