IndexError occurs when the item you want to retrieve is not found in the sequence like a list or tuple.
Indexing in Python starts from 0.
For Example:
Checking = list(range(53))
Checking[53]
Output
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-76-2de027faa7a5> in <module>
1 Checking = list(range(53))
----> 2 Checking[53]
IndexError: list index out of range
Correct way:
Checking[52]
Output
52
Thus, the index in iterables like list, string or tuples needs to be taken care of.