tuple list array
类型 元素数量是否可变 元素类型是否必须一致
tuple 不可变 不必须
list 可变 不必须
array 可变 必须

结论:

  • 三者比较,list较为宽松
  • 其中array非内建包,需要导入
posted on 2020-10-04 20:38  不可能被劝退的新手  阅读(106)  评论(0)    收藏  举报