摘要:
list_1 = [1,2,2,3,4,5,6,7,9,8] list_1 = set(list_1 ) #set去重复 print(list_1,type(list_1 )) #结果:{1, 2, 3, 4, 5, 6, 7, 8, 9} list_2 = set([0,2,22,66,33,6,8,22]) #直接set去重复 #list_2 = set(li... 阅读全文
posted @ 2017-03-29 19:50
penghx
阅读(177)
评论(0)
推荐(0)
摘要:
info = { 'p1101':["peng","hao"], 'p1102':"wu", 'p1103':"tan", 'p1104':"zhou", } print(info) print(info['p1101']) #查找,无则报错KeyError info["p1101"] = "彭" #修改 info["p1105"] = "ming 阅读全文
posted @ 2017-03-29 13:58
penghx
阅读(152)
评论(0)
推荐(0)

浙公网安备 33010602011771号