All -
I have a very basic question today ... but it has been preventing me from moving on productively in my programming, so I am posting it here.
I want to create a dictionary that takes a dictionary as a key. Presumably I can only pass a reference to the dictionary as key ... only I don't know how to do that in Python. Here is a toy reduction of what I am trying to do:
def test( dict ):
a={}
b={1:1}
a[ dict ] = b
return a
a = {0:0}
print test( a )
I would like b to be a dictionary of the form { {0:0} : {1:1} }.
Any help with this is much appreciated.
Kind regards -
Pat