[Python] How to read pickle file?

Discussão em 'Python' iniciado por Stack, Março 28, 2025.

  1. Stack

    Stack Membro Participativo

    I created some data and stored it several times like this:

    with open('filename', 'a') as f:
    pickle.dump(data, f)


    Every time the size of file increased, but when I open file

    with open('filename', 'rb') as f:
    x = pickle.load(f)


    I can see only data from the last time. How can I correctly read file?

    Continue reading...

Compartilhe esta Página