Skip to content

Instantly share code, notes, and snippets.

@blammothyst
Created February 27, 2014 20:30
Show Gist options
  • Save blammothyst/9258891 to your computer and use it in GitHub Desktop.
Save blammothyst/9258891 to your computer and use it in GitHub Desktop.
Code from Learn Python the Hard Way (.org) ex 8
formatter= "%r %r %r %r"
print formatter % (1, 2, 3, 4)
print formatter % ("one", "two", "three", "four")
print formatter % (True, False, False, True)
print formatter % (formatter, formatter, formatter, formatter)
print formatter % (
"I had this thing.",
"That could type up right.",
"But it didn't sing.",
"So I said goodnight."
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment