Module 04 of 11

Data Structures

Lessons

About This Module

With the basics of syntax, variables, and operators in place, it's time to learn how Python actually organizes data. This module covers the four built-in collection types you'll reach for constantly — plus the shorthand syntax for building them quickly and cleanly.

It starts with lists, tuples, and sets: how to create each one, when to use a mutable list versus an immutable tuple, and why sets are the right tool for unique, unordered values. From there it covers dictionaries — storing and retrieving data as key-value pairs, one of the most-used data structures in real Python programs. It closes with comprehensions, the compact syntax for building lists and dictionaries in a single, readable line instead of a multi-line loop.

Watch the lessons in order, then continue on to Control Flow & Loops.

Lessons

4 videos
01

Python Tutorial for Beginners 4: Lists, Tuples, and Sets

Working with sequential data using lists and tuples, plus sets for unordered, unique values — including the key methods and when to reach for each type.

02

Python Tutorial for Beginners 5: Dictionaries - Working with Key-Value Pairs

Creating dictionaries, accessing and updating values by key, and looping through key-value pairs.

03

Python 3 Tutorial for Beginners #21 - List Comprehensions

Building lists in a single, readable line using list comprehensions, instead of writing out a full for-loop.

04

What Are Dictionary Comprehensions in Python?

Applying the same comprehension shorthand to dictionaries, so you can build key-value pairs in one concise expression.