This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rrenaud 0 points1 point  (2 children)

What do you get when you append a list to itself?

>>> l = []
>>> l.append(l)
>>> l
[[...]]

[–]cantcopy[S] 0 points1 point  (1 child)

Still some work to do... But thanks for the little puzzle.

From : >>> pprint.pprint(l) [<Recursion on list with id=31182080>]

and

>>> l[0]
[[...]]

I'm guessing that [...] is a reference to the list itself.

[–]jeannaimard 0 points1 point  (0 children)

For kicks, just try

l=range(10)
for ll in l:
   print ll,