037 Accessing list elements with while - Comprehensive Python In Tamil
REPL
❯ uv run python
Python 3.14.3 (main, Feb 3 2026, 15:32:20) [Clang 17.0.0 (clang-1700.6.3.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> some_list = ["Duck", "Goose", "Chicken", 1, [5, 6, 7], "Tiger"]
>>> some_list
['Duck', 'Goose', 'Chicken', 1, [5, 6, 7], 'Tiger']
>>> len(some_list)
6
>>> some_list[6]
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
some_list[6]
~~~~~~~~~^^^
IndexError: list index out of range
>>> some_list[5]
'Tiger'
>>> some_list[0]
'Duck'
>>>Code