首页 > 其他 > 详细

3Day—查、增、删

时间:2018-05-02 18:42:17      阅读:176      评论:0      收藏:0      [点我收藏+]
#Author:Han Yadong
#import copy
names =["Zhang" , "Han" ,[1,2,3] ,"Wang"]
print(names [1::2])

#for i in names :
# print(i)


‘‘‘
name2 = copy .deepcopy(names)

names [2] [2] = "韩"
print(names)
print(name2)
‘‘‘
#print(names[-1])

#names.insert(2,"Wu")
#print(names)

#names.append("Wu")
#print(names)

#names [2] ="He"
#print(names)

#names.remove("Zhang")
#print(names)

#print(names .index("Han"))

#print(names [(names .index("Han"))])

3Day—查、增、删

原文:https://www.cnblogs.com/smile-donggua/p/8981582.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!