lst1=[10,20,30,40,10,60,70,80,90,100,1000] lst1[2]=2 #修改其中一个元素 print(lst1) lst1[3:6]=[1000,2000,3000.4000] #修改其中多个元素 print(lst1)
Powered by: 博客园 Copyright © 2024 蓝绝 Powered by .NET 9.0 on Kubernetes