Python基础【12】列表list

1.定义:

由一系列可变元素组成的可变的序列容器

 

[:]和copy()是浅拷贝

 

列表和字符串的对比:

tesh

 特殊: list1=[item for item in range(1,13)]      这个的意思是:

list1=[ ]

for item in range(1,13):

    list1.append(item)

posted on 2022-07-24 17:02  qllove  阅读(25)  评论(0编辑  收藏  举报

导航