Are there any datatype in python /collections module that would let me reduce my dictionary having same values (not into defaultdict though):
d = {'a': 'X', 'b': 'X', 'c': 'X', 'd': 'X', 'e': 'X', 'f': 'Z'}
to something smaller like
d = {('a','b','c','d','e'): 'X', ('f',): 'Z'}
So I can get same output 'X' when I pick
d['a'] == 'X'
I'm curious because 'X' is a long text in my code and It would be really easy to change all the values if mentioned only at one place.