On May 22, 7:21 pm, "Joel Koltner" <[EMAIL PROTECTED]>
wrote:
> Is there an easy way to get a list comprehension to produce a flat list of,
> say, [x,2*x] for each input argument?
>
> E.g., I'd like to do something like:
>
> [ [x,2*x] for x in range(4) ]

[x * i for x in xrange(4) for i in xrange(1, 3)]

--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to