最贊回答 / ericyang1987
\n 的確是換行的轉義字符。如果說直接輸出tds的話,會讓所有學生的成績橫向排列。 join() 的意思是把換行符號和tds里面每一個touple都做了鏈接,相當于<tr><td>Lisa</td><td>85</td></tr>/n
2016-01-15
最新回答 / 無極
# -*- coding:utf-8 -*-List =[]List.insert(0,[str('mark')]) ? ?# 插入成績項List.insert(1,[str('name')]) ? ?# 插入姓名項List[0].insert(1,int('99')) ? ? # 插入成績值List[1].insert(1,str('xiaomi')) # 插入姓名值List[0].insert(2,int('98')) ? ? # 插入成績值List[1].insert(2,str('xiaoli')...
2016-01-14
最新回答 / qq_du_0
python是強類型語言。你可以這樣理解:python是運行的時候才識別它的類型,所以它是動態的;但它本身是區分類型的,不同類型間數據計算需要顯式轉換。舉個例子:js是弱類型的:alert(1 + "2");//輸出的是12python: print 1 + "2" #會報類型錯的
2016-01-13
最新回答 / Littlewy
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }a=d.itervalues(); #return an dictionary-iterator object with the count and each valueb=d.values(); #return the value list
2016-01-11