Say you do the following:
a = [1]
a[0] = a
You end up with a as equal to [[...]]. What\'s going on here? How doe
We have a == [a] here, so in theory a should be printed as a list containing one element, which is a --- i.e. itself a list containing one element, which is itself a list containing one element, and so on. Or in print: an infinite number of [, followed by an infinite number of ]. The fact that we get instead [[...]] is just Python trying to be helpful and not actually printing an infinite number of [.