In article <c8abdc96-a47c-462a-9d6e-fcbaad110...@googlegroups.com>, Jon Reyes <everystepsa...@gmail.com> wrote:
> So I have a dictionary and the key is a number. > [...] > col = {"1": (0,1,2,3): "2": ((0,1,2,3),(2,3,4,5))} The keys here are strings, not numbers. But that's a detail. Somewhat more importantly, that's a syntax error (one of the colons should be a comma). > The values are either a > single tuple or a tuple of tuples. Is there a better way to go about > accessing the values of the dictionary? All the tuples contain four elements. I would make all the values the same shape, i.e. all lists of tuples: col = {"1": [(0,1,2,3)]: "2": [(0,1,2,3),(2,3,4,5)]} Then you're always doing the same thing with values when you process them. -- http://mail.python.org/mailman/listinfo/python-list