github:https://github.com/MichaelBeechan CSDN:https://blog.csdn.net/u011344545 python读文件: file = open(filename, "r") for line in file: #every line is a poem#print(line)title, poem = line.strip().
问题描述 如题 解决方案 因为pickle文件写入是binary格式,因此读取的时候也需要用binary格式。 return = open("picklefile", 'rb') 出现另外一个问题: _pickle.UnpicklingError: A load persistent id instruction was encountered,but no persistent_load