TypeError: ‘zip’ object is not callable
>>> list=zip(‘1234′,’abc’)
>>> list(list)
Traceback (most recent call last):
File “<pyshell#42>”, line 1, in <module>
list(list)
TypeError: ‘zip’ object is not callable
>>> l=zip(‘ab’,’123′)
>>> l
<zip object at 0x03562238>
>>> list(l)
Traceback (most recent call last):
File “<pyshell#45>”, line 1, in <module>
list(l)
TypeError: ‘zip’ object is not callable
这是因为自定义了list,所以出错,del(list)后,就可以了。
>>> del(list)
>>> list(l)
[(‘a’, ‘1’), (‘b’, ‘2’)]
转载自:https://blog.csdn.net/chenyx90/article/details/77920419