I understand that set keys are immutable, hence data types like lists are not eligible for being a key in the set. In the example shown below why can a tuple not work as a key if a dictionary is present inside the tuple? Can somebody help me with an explanation?
x= (1,{'a':1})
y= (1,2)
print(type(x),type(y))
# piece of code which is not giving me an error is below
set1 = {x,'INDIA'}
# set 2 can be created in similar manner without an error
set2 = {y,'INDIA'}
set2