On Thu, Apr 11, 2013 at 2:57 PM, Thomas Goebel <
thomas.goe...@ohm-hochschule.de> wrote:

> ...
> Which is the same as:
> f = {'list_' + str(n):[m for m in range(3)] for n in range(3)}
>

Thomas, thank you for your patience and your long explanation! Now I
understand better this shorthand expression of one single 'pythonic' ;)
line.
But didnt you miss square brackets:

f = {'list_' + str(n):[[m for m in range(3)] for n in range(3)]}

??
Otherwise the code wont work for me...
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to