
python
文章平均质量分 67
chenyx90
这个作者很懒,什么都没留下…
展开
-
TypeError: 'zip' object is not callable
>>> list=zip('1234','abc') >>> list(list) Traceback (most recent call last): File "", line 1, in list(list) TypeError: 'zip' object is not callable >>> l=zip('ab','123') >>> l >>> lis原创 2017-09-10 10:11:37 · 4165 阅读 · 1 评论 -
列表元素的删除操作for...remove
以下两段代码: listt=['a','b','a','b'] for i in listt: if 'a'==i: listt.remove(i) print(listt) 运行结果为: ['b', 'b'] 而对于listt=['a','a','b','a','b'] for i in listt: if 'a'==i:原创 2017-09-12 10:16:48 · 672 阅读 · 0 评论