Skip to content

Lesson 03 · Python

Python Foundations: Lists, Tuples, Dicts & Sets

The four core collections - lists, tuples, dicts and sets: what each is for, how to change them safely, and how to choose the right one for the job.

Prerequisites: Python Foundations: Functions & Control Flow

Learning objectives
By the end of this lesson, you will be able to:
  • Create and mutate lists with append, insert and remove
  • Read and write tuple unpacking, and respect immutability
  • Map keys to values and look them up safely with get()
  • De-duplicate with sets and test membership fast
  • Choose between list, tuple, dict and set for a task