Python Screencasts

Wondering what to watch/read next? Pick a new topic below and start watching from the beginning.

If you're completely new to a topic I recommend watching the videos for that topic in order. Make sure to come back to this page later, as the contents of each topic will change as new videos are released each week. Looking for what's new? There's a reverse chronological list here.

12 mins
Tuple Unpacking

It's tempting to reach for indexes when working with tuples, lists, and other sequences, but if we know the shape of the tuple we're working with, we can unpack it instead.

Tuple unpacking (aka "multiple assignment" or "iterable unpacking") is often underutilized by new Python programmers.

25 mins
Functions

Python, like many programming languages, has functions. A function is a block of code you can call to run that code.

Python's functions have a lot of "wait I didn't know that" features. Functions can define default argument values, functions can be called with keyword arguments, and functions can be written to accept any number of arguments.

10 mins
Looping

Unlike, JavaScript, C, Java, and many other programming languages we don't have traditional C-style for loops. Our for loops in Python don't have indexes.

This small distinction makes for some big differences in the way we loop in Python.

15 mins
Comprehensions

In Python it's very common to build up new lists while looping over old lists. Partly this is because we don't mutate lists very often while looping over them.

Because we build up new lists from old ones so often, Python has a special syntax to help us with this very common operation: list comprehensions.

14 mins
Variable Scope

Python has 4 scopes: local, enclosing, global, and built-ins. Python's "global" variables are only global to the module they're in. The only truly universal variables are the built-ins.

10 mins
Command-line programs

A .py file can be used as a module or as a "script" which is run from your operating system's command-line/terminal. Python is a great programming language for making command-line scripts.

16 mins
Modules

Modules are the tool we use for breaking up our code into multiple files in Python. When you write a .py file, you're making a Python module. You can import your own modules, modules included in the Python standard library, or modules in third-party packages.

27 mins
Assignment and Mutation

Python's variables aren't buckets that contain things; they're pointers that reference objects.

The way Python's variables work can often confuse folks new to Python, both new programmers and folks moving from other languages like C++ or Java.

18 mins
Generator Expressions

List comprehensions make new lists. Generator expressions make new generator objects. Generators are iterators, which are lazy single-use iterables. Unlike lists, generators aren't data structures. Instead they do work as you loop over them.

9 mins
Properties

We don't use getter and setter methods in Python. Instead we make properties.

Properties allow us to customize what happens when you access an attribute and what happens when you assign to an attribute.

Want to watch/read screencasts as they're announced?
Profile picture of Trey

My name is Trey Hunner and I'm a Python trainer. Through Python Morsels I publish new Python screencasts every week and I also send out Python exercises.

If you'd like to get announcements for new Python screencasts, sign up for Python Morsels below. I promise I won't spam you (see my Privacy Policy).

✨ Sign Up For Python Morsels ✨