I'm trying to add a key to a dictionary with the update() method, but since the program might need to be closed, I need for the key to be saved backed into the file for later use.
If I add the key {'car' : 'purple'} to the dictionary it would save as:
dict = {
        {'truck' : 'blue'},
        {'mini' : 'green'},
        {'car' : 'purple'}
}
instead of in its previous value.
dict = {
        {'truck' : 'blue'},
        {'mini' : 'green'}
}
 
     
    