>>> l3
set([2])
>>> l3=list(l3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'list' object is not callable
>>> l3=list(l3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'list' object is not callable
>>> l3
set([2])
我看网上python set 可以转换list 但是我这个怎么不行呢?谢谢
你的代码是什么?
如果是上面这样的,它是没错的
可能的原因是你定义了一个变量叫list, 把系统的关键字覆盖了
试试