How Do I Unpickle A Series Of Objects From A File In Python?
I have pickled objects to a file in append mode but it only reads a single object. Here's the code. I don't know what I am doing wrong. with open('notes.pkl', 'ab') as fileObject:
Solution 1:
You need to call pickle.load
repeatedly until you hit end-of-file.
Post a Comment for "How Do I Unpickle A Series Of Objects From A File In Python?"