07 2018 档案

摘要:#集合是无序的,不重复的数据组合, #主要是用来去重,测试两组数据的交集,差集,并集等 #创建一个集合 s = set([1,2,3,4,1,2,'a','b',]) print(s) #创建一个唯一字符的集合 t = set('abc') print(t) a = s|t#t和s的并集 print 阅读全文

posted @ 2018-07-27 13:29 lzcx

摘要:#字典是无序的 #key必须是唯一的,去重 info = { 'stu11':"Tase as", 'stu22':"saff sd", 'stu33':"faee fa", } info['stu44'] = "dere dd"#添加 info['stu11'] = 'MR 李'#修改 info. 阅读全文

posted @ 2018-07-27 13:27 lzcx

摘要:import copy name = ["zhangyang","guyun","xiangpeng",["alex","jack"],"chenrohhua","xuleicheng"] print(name[0:-1:2])#步长切片 for i in name:#列表for循环 print(i 阅读全文

posted @ 2018-07-27 13:18 lzcx

只有注册用户登录后才能阅读该文。

posted @ 2018-07-27 13:13 lzcx

导航