This commit is contained in:
2025-07-03 23:06:09 +08:00
parent 79963351e6
commit da0b3176d7
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,10 @@
a = ["b",2,3]
a.remove("b")#直接删
del a[0]#删索引值无[]默认整个列表
a.pop(0)#删索引值(用法同上)
a.clear()#清空
a.append(input(""))#添加
a[0]=''#更改第"0"个
a.sort()#按顺序整理
a.reverse()#翻转
len(a)