详细文字教程: https://morvanzhou.github.io/tutorials/
python3 简单教学教程
列表的基本功能.
例子:
a = [1,1,1,1]
a.append(2)
a.insert(1,2)
a.remove(2) # remove the first item whose value is 2
a[1]
a[-1]
a[1:3]
a[-3:]
a.index(2) # return the first item's index whose value is 2
a.count(2) # number of 2 in the list
a.sort(reverse=True)
播放列表: https://www.youtube.com/playlist?list=PLXO45tsB95cIRP5gCi8AlYwQ1uFO2aQBw