AI Workshop: learn to build apps with AI →
Control Flow and Collections
Learn to control program flow with conditionals and loops, and work with essential data structures: lists, tuples, dictionaries, and sets.

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


This unit covers control flow in Python (conditionals and loops) and the core collection types: lists, tuples, dictionaries, and sets. You’ll learn how to make decisions, iterate through data, and choose the right data structure for your needs.

Lessons in this unit:

0: ▶︎ Introduction
1: Control statements
2: Ternary operator
3: Loops
4: Lists
5: List comprehensions
6: How to create a list from a string
7: Tuples
8: Dictionaries
9: Sets