返回列表 發帖
  1. list=[12,-3,-50,32,25,11]
  2. print("排序前: ", list)
  3. list.sort()
  4. print("排序後: ",list)
  5. list.reverse()
  6. print("排序後 :",list)
  7. print("數量:",len(list))
  8. list.pop()
  9. print("pop ",list)
  10. list.append(-20)
  11. print("append ",list)
  12. list.insert(4,0)
  13. print("insert ",list)
複製代碼

TOP

返回列表