Keys should be frozenset, so that it can be more useful Also see this: https://stackoverflow.com/questions/29938321/multikey-multivalue-probabilistic-python-dictionary/29976659?noredirect=1#comment48085702_29976659