Remove or pop is not eliminating all the elements

前端 未结 0 1216
旧时难觅i
旧时难觅i 2020-12-01 12:10
lis =[3,4,5,6]
for j in lis:
    lis.remove(j)
lis

Result -[3,4] I tried pop() also but couldn\'t remove all elements

相关标签:
回答
  • 消灭零回复
提交回复
热议问题