totalStr='201709080012何倩仪 201709080013曾焕豪 201709080027许文杰 201709080012何倩仪 201709080013曾焕豪 201709080013曾焕豪 'totalList=totalStr.split(' ')totalset=set (totalList)print(totalList)print(totalset)totaldict={}for d in totalset : totaldict [d] =totalList.count(d)print(totaldict)
l=['o','p','q','r'] #可改变顺序可增加或减少元素l.append('o')print(l)t=('o','p','q','r')# 不能改变,也不能改变顺序scores=[90, 88, 99,77]d={ 'o':88,'p':99,'q':77,'r':90}# ,没有顺序 不能重复d['o']=90d['p']=100print(d)s1={ 'o','p','q','r'} # 没有顺序 不能重复s2={1,2,3,'o'}print(s1,s2)print(s1&s2)#交集print(s1|s2)#并集