摘要: (1)列表中的count方法(速度慢) #嵌套列表类型的统计 l = [[1,2,3,4,5],[1,2,3,4,5],[5,6,7,8,9]] dictionary= {} s = set(l) for i in s: dict[i] = l.count(i) (2)字典(速度慢) l = [[1 阅读全文
posted @ 2019-03-25 11:01 奥布莱恩 阅读(708) 评论(0) 推荐(0)