Topics
print, input and your first program
Run a first program that reads input and prints output.
Variables: boxes in memory
See how Python stores text and numbers, and what happens when a value changes.
Numbers, strings and type conversion
Use int, float, str, bool and convert between them.
If and else: making decisions
Follow Python as it checks a condition and picks which lines to run.
Loops: adding up a list
Watch a for loop visit every item and build up a running total.
while loops, break and continue
Loop until a condition changes; exit early or skip.
Strings and slicing
Index, slice and use string methods.
Lists
Store, add, remove and loop over items in a list.
Tuples and sets
Use tuples for fixed data and sets for unique items.
Dictionaries
Map keys to values and look them up fast.
Functions
Define functions with parameters and return values.
Default, keyword and *args arguments
Call functions flexibly with defaults and variable arguments.
Scope and mutable objects
See why changing a list inside a function changes it outside.
Recursion
Solve problems by calling a function on smaller input.
List and dict comprehensions
Build lists in one readable line.
lambda, map, filter, sorted
Use small anonymous functions with built-ins.
Errors and try/except
Handle bad input without crashing.
Reading and writing files
Open, read, write and append files safely with 'with'.
Modules and pip
Import standard modules and install packages.
Classes and objects
Create classes with attributes and methods.
Inheritance
Reuse and extend a class.
Iterators and generators
Produce values lazily with yield.
Mini project: quiz game
Combine lists, dicts, loops and functions into an app.