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/006151.html below:

[Python-Dev] re: list comprehension / pop quiz

[Python-Dev] re: list comprehension / pop quizVladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Wed, 12 Jul 2000 02:26:07 +0200 (CEST)
Guido van Rossum wrote:
> 
> What do you think the following code would print?

May I answer this? :-)

> 
>     for i in (10, 20, 30); j in (1, 2, 3):
>         print i+j
> 
> A.
> 
>     11
>     22
>     33
> 
> B.
>     11
>     12
>     13
>     21
>     22
>     23
>     31
>     32
>     33
> 
> I'm afraid the answer will be the same, if these are again numerical
> analysts -- these people live by nested DO loops. :-(

Without being a numerical analyst, I would respond B.
That's what this syntax suggests to me.

Someone proposed `for ... while ...' which clearly suggests something
different than nested loops, and in that case, if I don't know what it
is, I'll read the docs.

-- 
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252



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