A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/039191.html below:

[Python-Dev] accumulator display syntax

[Python-Dev] accumulator display syntax [Python-Dev] accumulator display syntaxMichael Chermside mcherm at mcherm.com
Tue Oct 21 16:38:33 EDT 2003
Skip writes:
> thought the definition for list comprehension syntax was something like
> 
>     '['
>         <expr> for <vars> in <expr>
>                [ for <vars> in <expr> ] *
>                [ if <expr> ] *
>     ']'

Nope:

>>> [x*y for x in 'aBcD' if x.islower() for y in range(4) if y%2]
['a', 'aaa', 'c', 'ccc']

-- Michael Chermside


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4