Services Work Learn About Contact
0/10
Lesson 4 of 10

Lists & Tuples

A list stores multiple items in one variable. Lists are mutable (you can change them). A tuple is similar but immutable (cannot be changed after creation).

Use square brackets [] for lists and parentheses () for tuples. Access items by index starting at 0.

PYTHON
fruits = ["apple", "banana", "cherry"]
fruits.append("date")
print(fruits[0])      # apple
print(len(fruits))    # 4

# Tuple (immutable)
coordinates = (10, 20)
print(coordinates[1]) # 20
🧠

Quick Quiz

Answer correctly to unlock the next lesson.

Support the mission

This learning platform is 100% free: no ads, no tracking, no paywalls. If it helped you learn something useful, you can support future lessons or donate to Doctors Without Borders, which provides emergency medical care in crisis zones worldwide.

🎉

You completed Python!

You finished all 10 lessons and quizzes. You now know the basics of Python.