Skip to content
26 July 32009 / Robin Wellner

A riddle…

While experimenting with the Python interactive interpreter, I came up with the following riddle — perhaps it is not very hard, perhaps it is virtually impossible to solve this, but it is possible:

  1. You have to use only core Python, without even using any standard libraries,
  2. You have to create three different objects, all of them bound to a single name,
  3. For each of them x[0][0][0] is x must be true,
  4. Only one of them can be a list,
  5. No other objects than the three specified can be created.
  6. (Just thought of this now…) They can’t be strings.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: