How can I have tuples or some other datastructure with the property that with the same elements, regardless of order, index to the same value in a dictionary?
Say I have a tuple (A, B)
as a key to a dictionary d
. So d[(A, B)] = 1 and d[(B,A)]) = 1
. It doesn't have to be a tuple.