pickle报EOFError: Ran out of input
import picklemy_list = ]
pickle_file = open('my_list.pkl','wb')
pickle.dump(my_list,pickle_file)
pickle_file.close
pickle_file1 = open('my_list.pkl','rb')
my_list2 = pickle.load(pickle_file1)
print(my_list2)
将pickle_file = open('my_list.pkl','rb') 改为pickle_file1 = open('my_list.pkl','rb')为什么会报错EOFError: Ran out of input pickle_file.close()
页:
[1]