这是我读《Learn Python The Hard Way》所做的练习,如果有错误请指正。
#create a variable named "formatter" and assign in
formatter = "%r %r %r %r"
# display formatter and replace format character with
# the thing behind "%"
print formatter % (1, 2, 3, 4)
print formatter % ("one", "two", "three", "four")
print formatter % (True, False, False, True)
print formatter % (
"I had this thing.",
"That you could type up right.",
"But it didn't sing.",
"So I said goodnight."
)