相关疑难解决方法(0)

带有python列表的循环引用

有人可以解释一下吗?

>>> x=x[0]=[0]
>>> x
[[...]]
>>> x is x[0]
True
>>> x[0][0][0][0][0][0][0]
[[...]]
>>> x in x
True
Run Code Online (Sandbox Code Playgroud)

什么是 [...]?

python list circular-reference

4
推荐指数
1
解决办法
1090
查看次数

标签 统计

circular-reference ×1

list ×1

python ×1