Python lists for beginners
Store and transform collections using Python lists, indexes, methods, and iteration.
Understanding lists
Lists hold multiple values in order and can be changed after they are created. Practice accessing elements, appending values, traversing a list, and connecting lists with strings. Pay attention to whether a method changes the original list or returns a new value.
scores = [7, 9, 8]
scores.append(10)
print(len(scores)) # 4
print(sum(scores)) # 34append() changes scores in place. len() counts the items and sum() adds their numeric values.
What you will practice
Work through eight coding missions, then test your understanding with ten multiple-choice questions. Each mission provides starter code, a hint, and feedback after you run it.
- Index and mutate — A list is a sequence; Lists are mutable
- Combine, repeat, and slice — List operations; List slices
- Append, extend, and sort — List methods
- Remove an element — Deleting elements
- Lists and string methods — Lists and strings
- Copy without aliasing — Objects and values; Aliasing; Debugging
- Unique words in a file — Exercises: Exercise 4
- A guarded mail reader — Debugging: Lists, split, and files; Exercises 2 and 5
Your chapter progress is saved in this browser. Complete all 18 checks to unlock a certificate at your earned practice score, and download your notebook or grade report to keep a copy.
Read, practice, and try again
For the chapter reading, see Python for Everybody: Lists by Charles R. Severance (CC BY 4.0). ZHUDDLE adds its own practice activities and scoring. The browser runs Python after its first interpreter download; no local installation is required.
Start the lists exercises →