Why does Python extend output [[...]]

<>

This question already has an answer here:

Answers


The ... indicates that the list contains a recursive loop, i.e., at some level something contains itself. This is because you extended x with x, so you essentially put x inside itself.

There is no ... in the second example because y is a distinct object. Although it happens to be equal to x[0] in that both are empty lists, they are not the same empty list.


Need Your Help

C# List.Find() seems not working when list is huge

c# .net comparison

I have a huge List, say 10 million items in it, which I'm trying to find a specific value in the list.

Best way to do async programming with Asp.Net

asp.net node.js asp.net-web-api signalr

There seems to be several options available at the moment to do async/push-style programming with asp.net. But I'm a little confused as to what is the best and what offers the most developer friendly