In my case, I have a dictionary like this
dic_ = {'btcusd': [-1.0, -1.0],
'usdjpy': [-1.0, -1.0]}
For example, I would like to update the key 'usdjpy', I using this code
dic_['usdjpy'].append(1)
However, It updates all other keys in this dictionary and gives the result like
{'btcusd': [-1.0, -1.0, 1],
'usdjpy': [-1.0, -1.0, 1]}
So how to solve this problem?
My desire result is as below
{'btcusd': [-1.0, -1.0],
'usdjpy': [-1.0, -1.0, 1]}