最贊回答 / 小于飛飛
('Adam', 95), ('Lisa', 85), ('Bart', 59)可以看成三組數,第組數中的第個數表示x[0],x[1].所以print x[0] + ':', x[1] ?理解為,輸出第組數"名字:成績"
2014-11-06
最新回答 / 懶蟲009
不可以,實際應用會出現警告:print r""""To be, or not to be": that is the question.Whether it's nobler in the mind to suffer.""""To be, or not to be": that is the question.Whether it's nobler in the mind to suffer.
2014-11-06
最新回答 / 洗車里的路飛
print r'"to be,or not to be":that is the question.Whether it\'s nobler in the mind to suffer.'?兩句話,但是不把它行,那怎么寫才能讓后面的it's以及后面正常顯示。因為他顯示的是"to be,or not to be":that is the question.Whether it\'s nobler in the mind to suffer.
2014-11-06
最贊回答 / 謝文東
你需要把L中的每個元素都加和,最后加和的結果是sum,但是你把每個元素都定義為sum了,這個相當于把0.0加了四次,沒有起到對L中的元素求和的作用,你需要定義一個和求和這個變量不同的變量來表示L中的不同的變量。
2014-11-06