"Octavian Rasnita" <orasn...@gmail.com> writes:
> If I want to create a dictionary from a list...
> l = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b']

    dict(l[i:i+2] for i in xrange(0,len(l),2))

seems simplest to me.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to