單引號&雙引號 print "hello, world"
和 print 'hello, world'
是一樣的。
單引號特殊用途:英語中的單引號的使用。如 print 'hello, dogs' world'
是錯誤的,而 print "hello, dogs' world"
是正確的。
三個雙引號的用途:可以用真是的回車代替\n
。如print "hello, \nbig \nworld"
看起來就不是很舒服,於是引入了更易於人閱讀的寫法,如
print """hello,
big
world"""