Python报错IndexError list index out of range

第1种可能情况

list[index] 中的index超出范围

第2种可能情况

list是一个空的 没有一个元素
进行list[0]就会出现该错误

参考
https://blog.csdn.net/pddddd/article/details/47110813

猜你喜欢

转载自www.cnblogs.com/denglinzhe/p/12673768.html