I have a function. Inside that I'm maintainfing a dictionary of values. I want that dictionary to be maintained between different function calls
Suppose the dic is:
a = {'a': 1, 'b': 2, 'c': 3}
At first call, say, I changed a['a']
to 100.
Dict becomes a = {'a': 100, 'b': 2, 'c': 3}
.
At another call, I changed a['b']
to 200.
I want that dic to be a = {'a': 100, 'b': 200, 'c': 3}
But in my code a['a']
doesn't remain 100. It changes to initial value 1.