编辑以下内容:
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 you could type up right.",
"But it didn't sing.",
"So I said goodnight."
)
会看到以下结果:
注意最后一行程序中既有单引号又有双引号,你觉得它是如何工作的?我们思考一下。