🔢 Indexing lets you access elements inside sequences and containers like strings, lists, tuples, and dictionaries. It’s like picking specific items out of a box—once you master it, you’ll access data with precision and speed.
1 Zero-Based Indexing
Python uses zero-based indexing, meaning the first element has index 0.
---------------------------------------------------------------------------IndexError Traceback (most recent call last)
CellIn[7], line 2 1 electives = ['Deep Learning', 'Algorithm Design', 'Reinforcement Learning']
----> 2print(electives[3])
IndexError: list index out of range