hash a set in python
June 10th, 2007 by Lawrence David
to hash a set in python, you need to make it immutable:
from sets import Set
…
this_set = frozenset(i)
my_dict[this_set] = 1
June 10th, 2007 by Lawrence David
to hash a set in python, you need to make it immutable:
from sets import Set
…
this_set = frozenset(i)
my_dict[this_set] = 1