Courses/Data Structures

๐Ÿ“ฆ Data Structures

Lists

Ordered, mutable collections.

A list holds a sequence of items in order. You can add, remove, and change them.

fruits = ["apple", "banana", "cherry"]
fruits.append("date")
print(fruits[0])     # apple
print(len(fruits))   # 4
main.py
Output
Press Run to execute.
Expected output
[1, 1, 2, 3, 4, 5, 6, 9]

Sign in to track your progress across lessons.