Modifying every alternate element of a sequence

Leo Kislov Leo.Kislov at
Tue Nov 28 13:30:17 CET 2006

jm.suresh at wrote:
> Wow, I was in fact searching for this syntax in the python tutorial. It
> is missing there.
>  Is there a reference page which documents all possible list
> comprehensions.

There is actually only two forms of list comprehensions:
[blah for x in expr] and [blah for x in expr if cond]

And here is reference page for slicing (note, it's not list

  -- Leo

More information about the Python-list mailing list