Created
August 5, 2008 08:43
-
-
Save jeremyBanks/4044 to your computer and use it in GitHub Desktop.
[2010-01] "There's a string.Template? What's that do?"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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