[Python-il] Silly Python riddle

Ram Rachum ram at rachum.com
Sat Dec 17 14:14:00 IST 2011


Here's a silly Python riddle for you.

Today I opened up a Python 2.7 shell, and ran two commands in it.

>>> f = lambda: g(*???*)
> >>> f()


(Note that these are the only commands that I ran. You're not allowed to
run any other commands before them.)

The riddle: What's the shortest thing you can put instead of *???* so my
second command would not raise an exception?


Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://hamakor.org.il/pipermail/python-il/attachments/20111217/69cb35ca/attachment.htm>


More information about the Python-il mailing list