gpt4 book ai didi

python - (Python) 列表索引超出范围 - 迭代

转载 作者:行者123 更新时间:2023-11-28 19:32:37 33 4
gpt4 key购买 nike

<分区>

for i in range(len(lst)):    
if lst[i][0]==1 or lst[i][1]==1:
lst.remove(lst[i])
return lst

这给出了“IndexError: list index out of range”为什么会这样?

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com