What happens when you append a list to itself? [duplicate]
问题 This question already has answers here : What do ellipsis […] mean in a list? (6 answers) Closed 4 years ago . Suppose I ran the program x=[] x.append(x) print(x) I get [[...]] as the output. But what does it mean? Is the list storing pointers and then pointing to itself? Or is it copying itself never quite completely? How is this list stored in memory? Amendment: I'm trying to get my head around how python accomplishes this self reference. If I wanted to design a way of storing lists that