Having a look at python documentation I found: zip() in conjunction with the * operator can be used to unzip a list:
>>> x = [1, 2, 3] >>> y = [4, 5, 6] >>> zipped = zip(x, y) >>> zipped [(1, 4), (2, 5), (3, 6)] >>> x2, y2 = zip(*zipped) >>> x == x2, y == y2 True So, >>> x2, y2 = zip(*d.items()) should fix your problem -- http://mail.python.org/mailman/listinfo/python-list