Here is what I am trying to do. I am trying to make a dict that has a key that is the value an element in a list and the value for the dict to be the index.
This is the closest I have been able to get:
dict((d[0],i) for d in self.cu.description for i in xrange(len(self.cu.description)-1))
That however does not work. the value for all the dict is 40. Not 1, 2, 3, ... that I was hoping for.
Am I even close at creating the dict that I want? Is there a better way to go about it?
--
-Echo
-- http://mail.python.org/mailman/listinfo/python-list