I need to create a hash of hash in python.
>>> x = {}
>>> y = 42
>>> z = 'first'
>>> x = {y:{z:'first value'}}
>>> x
{42: {'first': 'first value'}}
This is working but if I try to add another value, it is not working.. x is having only the current value..
>>> y = 45
>>> z = 'second'
>>> x = {y:{z:'Second value'}}
>>> x
{45: {'second': 'second value'}}
Now x is having only this value.
Can anyone please tell me how to add values..
Thank you..
>>> x = {}
>>> y = 42
>>> z = 'first'
>>> x = {y:{z:'first value'}}
>>> x
{42: {'first': 'first value'}}
This is working but if I try to add another value, it is not working.. x is having only the current value..
>>> y = 45
>>> z = 'second'
>>> x = {y:{z:'Second value'}}
>>> x
{45: {'second': 'second value'}}
Now x is having only this value.
Can anyone please tell me how to add values..
Thank you..
Comment