On Monday, October 8, 2012 10:06:50 PM UTC-4, Roy Smith wrote:
> In article <[email protected]>,
>
(big snip)
>
>
> > y = list(itertools.chain.from_iterable(('insertme', x[i]) for i in
> > range(len(x))))
>
>
>
> A statement ending in four close parens is usually going to be pretty
>
> difficult to figure out. This is one where I had to pull out my pencil
>
> and start pairing them off manually to figure out how to parse it.
Fair enough. I admit I was looking for a tricky one-liner, which rarely leads
to good code...I should know better.
Thanks for all the feedback from everyone. It's amazing how much Python one
can learn just asking about a small section of code!
--
http://mail.python.org/mailman/listinfo/python-list