最新回答 / 夏純達
因為使用pop()方法總是刪掉list的最后一個元素,并且它還返回這個元素,所以我們執行 L.pop() 后,最后會打印出 'Paul',而不是打印出‘Adam’,‘Lisa’.
2014-11-07
最贊回答 / 小于飛飛
('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