A small quiz question

Joel Goldstick joel.goldstick at gmail.com
Wed Aug 16 07:17:05 EDT 2017


On Wed, Aug 16, 2017 at 7:06 AM, Stefan Ram <ram at zedat.fu-berlin.de> wrote:

>   I wrote my first Python quiz question!
>
>   It goes like this:
>
>   Can you predict (without trying it out) what the Python
>   console will output after the following three lines have
>   been entered?
>
> def f(i): print(i); return i;
>
> f(4)**f(1)**f(2)
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

That's a nice problem for order evaluation.  I guessed wrong.

-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays



More information about the Python-list mailing list