I\'m wondering if there\'s any way to populate a dictionary such that you have multiple keys mapping to the same value that\'s less verbose than say:
d = {1:
How about:
501 $ python Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a = {"q":1} >>> print a {'q': 1} >>> a["q"] 1 >>> a["r"] = a["s"] = a["t"] = 2 >>> a {'q': 1, 's': 2, 'r': 2, 't': 2} >>>