摘要:
arr = [1,2,3,4,5,6,4,5,2,3,6,8,9,6,5,3,6,2,4]dic={}for item in arr: if item in dic.keys(): dic[item]+=1 else: dic[item]=1dic= sorted(dic.items(), key= 阅读全文
摘要:
#!/usr/bin/python# -*- coding: UTF-8 -*-import csvwith open('file.csv','a',newline='') as csvfile: spamwriter = csv.writer(csvfile, dialect='excel') w 阅读全文