CHAPTER 32   •   PYTHON

Python List Index

Learn how to access individual list items.

01 What is this?

Learn how to access individual list items.

02 Syntax

Python Syntax
list[index]

03 Example

Python Example
fruits = ['Apple', 'Mango', 'Orange']
print(fruits[0])
print(fruits[1])

04 Important Points

Python uses zero-based indexing.

05 Common Mistakes

Do not access an index that does not exist.

06 Real World Use

Indexing is essential when working with collections.

07 Practice This Topic

Now try the example yourself in the AIFA Python Editor.

  • Read the example carefully.
  • Change the values.
  • Run the code.
  • Observe the output.
  • Try creating your own example.
Try It Yourself →