做题时遇到大量字符串怎么办??利用 collection 模块简化代码from collections import Counterwith open("flag.txt") as f: text_list = f.readlines() '''将读取的内容转换为字符串''' text_str = ''.join(text_list) count = Counter(text_str) print (count) python