IndexError: list index out of range and python

后端 未结 8 2411
醉酒成梦
醉酒成梦 2020-11-22 04:58

I\'m telling my program to print out line 53 of an output. Is this error telling me that there aren\'t that many lines and therefore can not print it out?

8条回答
  •  借酒劲吻你
    2020-11-22 05:21

    In Python, indexing starts at 0. Therefore, if you have a list with 53 items, list[52] will be the last item in the list.

提交回复
热议问题