On Thu, Apr 11, 2013 at 10:57 PM, Thomas Goebel <[email protected]> wrote: > [a for a in range(3)] > > will return a list > [0, 1, 2]
Simplification possible: That's the same as:
list(range(3))
> f = {'list_' + str(n):[m for m in range(3)] for n in range(3)}
Meaning that this can be simplified too:
f = {'list_' + str(n):list(range(3)) for n in range(3)}
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
