haha = {'money':50000, 'stock':{'0050':4, '0052':30}, 'sell':{'0011','0022'}}
haha['stock']['0053'] = 44
haha['stock']['0050'] = 14
haha['test']= dict()
haha['test']['insert'] = 1
del haha['stock']['0050']
print(haha)
輸出
{'money': 50000, 'stock': {'0052': 30, '0053': 44}, 'sell': {'0022', '0011'}, 'test': {'insert': 1}}
沒有留言:
張貼留言