Lesson 1 · Python Foundation
Storing multiple items.
Storing four marks meant four variables. Storing forty students' names would mean forty. That clearly doesn't scale.
A list holds many values under one name:
marks = [85, 92, 78, 88]
names = ["Ananya", "Bilal", "Chetan"]
Square brackets, values separated by commas. One name, as many items as you like — and you can add more while the program runs.
7 more parts in this lesson
Walkthroughs, code labs, mini-games and the checkpoint quiz unlock when you buy the course.