Python一段程序中为何结果有的是‘ ‘ 有的是“ ”?

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.'

为什么有的是‘     ’有的是‘’‘’?


毛毛雨林527
浏览 1147回答 1
1回答

蜂之谷

因为"But it didn't sing."  这句中间有单引号啊
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python