摘要: 1、统计元素的个数:a = [1, 2, 3, 1, 1, 2]dict = {}for key in a: dict[key] = dict.get(key,0) + 1print(dict)def count(m): for i in a: result = a.count(m) print(r 阅读全文
posted @ 2021-08-12 20:27 微风轻哨 阅读(791) 评论(0) 推荐(0) 编辑