Python List Index Error: Understanding 'IndexError' in Python
This code will result in an error because the list 'num_li' only contains three elements (indexed at 0, 1, and 2), so trying to access the fourth element (indexed at 3) will result in an 'IndexError' since it is out of range.
原文地址: https://www.cveoy.top/t/topic/mMNt 著作权归作者所有。请勿转载和采集!