python自學之路-基礎篇(四)

##習題1: 列表a = [11,22,24,29,30,32] 1 把28插入到列表的末端python a.append(28) 2 在元素29後面插入元素57數組 a.insert(4,57) 3 把元素11修改爲6app a[0]=6 3 刪除元素32code a.pop(6) # 或者 del a[6] 4 對列表從小到大排序對象 a.sort() # 倒排序是reverse ##習題2:
相關文章
相關標籤/搜索