最贊回答 / 小于飛飛
('Adam', 95), ('Lisa', 85), ('Bart', 59)可以看成三組數(shù),第組數(shù)中的第個(gè)數(shù)表示x[0],x[1].所以print x[0] + ':', x[1] ?理解為,輸出第組數(shù)"名字:成績(jī)"
2014-11-06
最新回答 / 懶蟲009
不可以,實(shí)際應(yīng)用會(huì)出現(xiàn)警告: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
最新回答 / 洗車?yán)锏穆凤w
print r'"to be,or not to be":that is the question.Whether it\'s nobler in the mind to suffer.'?兩句話,但是不把它行,那怎么寫才能讓后面的it's以及后面正常顯示。因?yàn)樗@示的是"to be,or not to be":that is the question.Whether it\'s nobler in the mind to suffer.
2014-11-06
最新回答 / 魏大大x
老師這道題的意思估計(jì)是不要用enumerate()而是用zip和range組合來(lái)實(shí)現(xiàn)enumerate()的功能~~~~~~
2014-11-06
最贊回答 / 謝文東
你需要把L中的每個(gè)元素都加和,最后加和的結(jié)果是sum,但是你把每個(gè)元素都定義為sum了,這個(gè)相當(dāng)于把0.0加了四次,沒有起到對(duì)L中的元素求和的作用,你需要定義一個(gè)和求和這個(gè)變量不同的變量來(lái)表示L中的不同的變量。
2014-11-06