[Python] How to detect if any element in a dictionary changes?

Discussão em 'Python' iniciado por Stack, Setembro 11, 2025.

  1. Stack

    Stack Membro Participativo

    Rather than saving a duplicate of the dictionary and comparing the old with the new, alike this:

    dict = { "apple":10, "pear":20 }

    if ( dict_old != dict ):
    do something
    dict_old = dict


    How is it possible to detect WHEN any element of a dictionary changes?

    Continue reading...

Compartilhe esta Página