PYthon中以雙引號和單引號來進行多行注釋
同時Python 接收單引號(' ),雙引號(" ),三引號(''' """) 來表示字符串,引號的開始與結束必須的相同類型的
其中三引號可以由多行組成,編寫多行文本的快捷語法,常用語文檔字符串,在文件的特定地點,被當做注釋。
Python 2.6.6環境中
"""
item_one = 1
item_two = 2
item_three = 3
total = item_one + \
item_two + \
item_three
print total
word = 'word'
sentence = "lskdjn"
paragraph = '''kjhkjnda
shdkjfakj
sdnf'''#這里用三個單引號來進行多行賦值,如果換成三個雙引號會報語法錯誤。估計運行時會識別'paragraph='這個賦值語句,導致賦值中的三個雙引號與之前的三個雙引號作用引起歧義沖突。具體為什么還沒有搞明白,后續邊學邊看了。
print paragraph
raw_input("\n\nPress the enter key to exit.")
"""