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/2000-July/006406.html below:

[Python-Dev] List comprehensions

[Python-Dev] List comprehensionsPaul Prescod paul@prescod.net
Thu, 13 Jul 2000 07:27:02 -0500
Skip Montanaro wrote:
> 
>     Paul> [for x: if y(x): for z: (x,y,z)]
> 
> Agreed, however, your use of colons connotes the following to me
> 
>     l = []
>     for x in something:
>         if y(x):
>             for z in something_else:
>                 l.append((x,y,z))
>     return l

Yes, that's right. I forgot the "in something" and "in something_else"
parts but your interpretation was still correct (a fault tolerant
notation!!).

[for x in something: if y(x): for z in something_else: (x,y,z)]

-- 
 Paul Prescod - Not encumbered by corporate consensus
Simplicity does not precede complexity, but follows it. 
	- http://www.cs.yale.edu/~perlis-alan/quotes.html



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