单引号和双引号:
formatter = "%r %r %r %r"
print formatter % (
"I had this thing.",
"That you could type up right.",
"But it didn't sing.",
"So I said goodnight."
)
打印结果为:
'I had this thing.' 'That you could type up right.' "But it didn't sing." 'So I said goodnight.'
红色部分由于含有单引号,所以最外面的自动变成双引号