摘要: 第一种:vocab = dict(Counter(text).most_common(MAX_VOCAB_SIZE-1)) 举例: from collections import Counter colors = ['red', 'blue', 'red', 'green', 'blue', 'bl 阅读全文
posted @ 2020-08-25 17:17 kpwong 阅读(907) 评论(0) 推荐(0) 编辑