Python Screencasts

Short Python articles. Most have a screencast version too.

Bite-sized Python screencasts. Each one has an article version too.

296 articles · 22 hours read
238 screencasts · 14 hours watch
Filter by topic
Searching… Search unavailable — try again in a moment. Results for

Cheat Sheets

13 articles 4 screencasts · 2 hr 21 min read 17 min watch

A collection of the many Python cheat sheets within Python Morsels articles and screencasts.

Assignment and Mutation

14 articles 13 screencasts · 52 min read 44 min watch

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.

Strings

23 articles 18 screencasts · 1 hr 42 min read 56 min watch

Regardless of what you're doing in Python, you almost certainly use strings all the time. A string is usually the default tool we reach for when we don't have a more specific way to represent our data.

Conditionals

12 articles 11 screencasts · 45 min read 30 min watch

Conditionals statements (if statements) are useful for making a branch in our Python code. If a particular condition is met, we run one block of code, and if not then we run another block.

Data Structures

24 articles 18 screencasts · 1 hr 42 min read 1 hr 2 min watch

These articles are all about Python's core structures: lists, tuples, sets, and dictionaries.

Looping

16 articles 14 screencasts · 56 min read 40 min watch

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.

Comments

4 articles 3 screencasts · 16 min read 11 min watch

Comments and documentation strings

Debugging

8 articles 5 screencasts · 51 min read 18 min watch

Your code has a bug in it. What now?

Tuple Unpacking

4 articles 4 screencasts · 13 min read 13 min watch

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.

Modules

10 articles 9 screencasts · 45 min read 34 min watch

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.

Functions

18 articles 16 screencasts · 1 hr 12 min read 53 min watch

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.

Variable Scope

5 articles 5 screencasts · 14 min read 18 min watch

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.

Files

18 articles 17 screencasts · 1 hr 18 min read 58 min watch

Reading from and writing to text files (and sometimes binary files) is an important skill for most Python programmers.

Command-Line Progarms

4 articles 3 screencasts · 16 min read 10 min watch

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.

Overlooked Fundamentals

32 articles 20 screencasts · 3 hr 12 min read 1 hr 3 min watch

These topics are commonly overlooked by new Python programmers.

Exceptions

10 articles 8 screencasts · 56 min read 28 min watch

Exceptions happens! When exceptions happen, how should interpret the traceback for an exception? And how, when, and where should you catch exceptions?

Comprehensions

7 articles 7 screencasts · 28 min read 23 min watch

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.

datetime

3 articles 0 screencasts · 12 min read 0 min watch

Working with dates and times in Python

Asterisks

7 articles 7 screencasts · 21 min read 21 min watch

Python has an * prefix operator and a ** prefix operator that can be used in many different ways.

The below screencasts & articles explain each of the many uses of the * and ** operators in Python.

Package Management

3 articles 3 screencasts · 16 min read 11 min watch

Python's standard library includes a lot of helpful modules. But often Python code depends on third-party packages. What are the best practices when working with third party packages in Python?

Classes

21 articles 18 screencasts · 1 hr 19 min read 1 hr 7 min watch

Classes are a way to bundle functionality and state together. The terms "type" and "class" are interchangeable: list, dict, tuple, int, str, set, and bool are all classes.

You'll certainly use quite a few classes in Python (remember types are classes) but you may not need to create your own often.

Data Classes

6 articles 4 screencasts · 31 min read 14 min watch

Inheritance

3 articles 3 screencasts · 11 min read 10 min watch

Classes can inherit functionality from other classes in Python. Class inheritance can be helpful, but it can also be very complex.

Properties

4 articles 4 screencasts · 14 min read 13 min watch

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.

Dunder Methods

22 articles 14 screencasts · 1 hr 58 min read 48 min watch

You can overload many operators, protocols, and bits of functionality on your Python objects by implementing dunder methods.

Generator Expressions

5 articles 5 screencasts · 20 min read 19 min watch

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.

Generator Functions

6 articles 5 screencasts · 24 min read 16 min watch

Generator functions look like regular functions but they have one or more yield statements within them. Unlike regular functions, the code within a generator function isn't run when you call it! Calling a generator function returns a generator object, which is a lazy iterable.

Context Managers

3 articles 3 screencasts · 18 min read 14 min watch

A context manager as an object that can be used with Python's with blocks. You can make your own context manager by implementing a __enter__ method and a __exit__ method.

Decorators

14 articles 14 screencasts · 54 min read 48 min watch

Decorators are functions that accept functions and return functions. They're weird but powerful.

Other

18 articles 9 screencasts · 1 hr 19 min read 37 min watch

No matches

Try clearing your search or removing the topic filter.

2026

  1. Selecting random values New
    Other 5 min read 05:42 watch
  2. What types of exceptions should you catch? New
    Exceptions 5 min read 04:10 watch
  3. The list extend method New
    Premium Other 2 min read 01:55 watch
  4. Assigning to slices New
    Premium Other 2 min read 02:15 watch
  5. Standard error New
    Files 5 min read 03:58 watch
  6. Making friendly classes New
    Other 4 min read
  7. Invent your own comprehensions New
    Other 3 min read
  8. When are classes used in Python? New
    Classes 4 min read 02:55 watch
  9. Lexicographical ordering
    Premium Data Structures 5 min read 04:46 watch
  10. Setting default dictionary values
    Cheat Sheets Data Structures 7 min read 05:23 watch
  11. switch-case in Python? It's not match-case!
    Conditionals 6 min read 04:06 watch
  12. Is it a class or a function?
    Functions Classes 4 min read 04:29 watch
  13. All iteration is the same
    Looping 4 min read 03:56 watch
  14. Self-concatenation
  15. Debugging with f-strings
    Strings Debugging 4 min read 02:45 watch
  16. Implicit string concatenation
    Strings 5 min read 03:30 watch

2025

  1. Embrace whitespace
  2. Wrapping text output
    Strings 4 min read 02:49 watch
  3. Unnecessary parentheses
  4. __slots__ for optimizing classes
    Classes 5 min read 03:50 watch
  5. __dict__: where Python stores attributes
    Classes 6 min read 04:45 watch
  6. T-strings: Python's Fifth String Formatting Technique?
    Strings 6 min read 04:29 watch
  7. Python 3.14's best new features
    Other 6 min read 05:55 watch
  8. Why splitlines() instead of split("\n")?
    Strings 3 min read 02:38 watch
  9. Nested list comprehensions
    Comprehensions 6 min read 05:27 watch
  10. Python REPL Shortcuts & Features
  11. Removing list items
    Premium Data Structures 3 min read 02:17 watch
  12. The power of Python's print function
    Overlooked Fundamentals 5 min read 04:49 watch
  13. Checking your operating system
    Other 3 min read 03:22 watch
  14. Checking for string prefixes and suffixes
    Strings 3 min read 03:26 watch
  15. Re-raising exceptions
    Premium Exceptions 6 min read 05:03 watch
  16. Using dictionaries
    Data Structures 2 min read 02:17 watch
  17. Nested functions
    Decorators 4 min read 04:24 watch
  18. Don't call dunder methods
    Dunder Methods 5 min read
  19. Decorators with optional arguments
    Premium Decorators 5 min read 03:43 watch
  20. Breaking out of a loop
    Looping 5 min read 02:42 watch
  21. Python's "while" loop
    Looping 3 min read 02:07 watch
  22. Equality with data structures
    Premium Data Structures 3 min read 03:45 watch
  23. Decorators can return anything
    Premium Decorators 4 min read 03:24 watch
  24. Avoid indexes
  25. Enclosing scope
    Premium Variable Scope Decorators 4 min read 03:55 watch
  26. Looping in reverse
    Looping 4 min read 02:56 watch
  27. Common decorators included with Python
    Premium Decorators 2 min read 01:40 watch
  28. Sorting iterables
    Looping 3 min read 02:25 watch
  29. Practical uses of sets
    Data Structures 5 min read 04:09 watch
  30. Mutable default arguments
    Functions 4 min read 03:47 watch
  31. Unpacking arbitrary keyword arguments into a function call
    Premium Asterisks 3 min read 03:22 watch
  32. Checking whether iterables are equal
    Looping 4 min read 03:20 watch
  33. Refactoring long boolean expressions
    Conditionals 4 min read 03:09 watch
  34. Alternatives to Python's "break" statement
    Looping 3 min read
  35. Running subprocesses
    Premium Other 7 min read 05:48 watch
  36. The features of Python's help() function
    Debugging 10 min read
  37. Multiline strings
    Strings 2 min read 01:50 watch
  38. Avoid over-commenting
    Comments 5 min read
  39. Newlines and escape sequences
    Strings 6 min read 07:10 watch
  40. Python Terminology: an unofficial glossary
  41. datetime arithmetic
    Premium datetime 7 min read
  42. Uppercasing and lowercasing
    Premium Strings 3 min read 03:17 watch
  43. Python's range() function
    Looping 3 min read 02:26 watch
  44. The benefits of trailing commas
    Overlooked Fundamentals 5 min read 03:01 watch

2024

  1. Merging dictionaries
    Data Structures 5 min read 04:00 watch
  2. Storing attributes on functions
    Premium Functions Decorators 3 min read 02:44 watch
  3. Python's pathlib module
  4. Inspecting objects
    Debugging 5 min read 04:55 watch
  5. Customizing dataclass fields
    Premium Data Classes 5 min read 03:58 watch
  6. Customizing dataclass initialization
    Premium Data Classes 5 min read 04:15 watch
  7. Python 3.13's best new features
    Other 9 min read 06:21 watch
  8. Converting a string to a datetime
  9. The string split method
    Strings 2 min read 01:48 watch
  10. Prompting a user for input
    Overlooked Fundamentals 1 min read 00:47 watch
  11. Understanding help()
  12. Boolean operators
    Conditionals 3 min read 02:30 watch
  13. Commenting
  14. Creating Python programs
    Overlooked Fundamentals 3 min read 03:28 watch
  15. Functions and Methods
    Functions 4 min read 03:13 watch
  16. Arithmetic
    Overlooked Fundamentals 2 min read 01:59 watch
  17. Checking for an empty list
    Data Structures 2 min read 02:23 watch
  18. Customizing dataclasses with arguments
    Premium Data Classes 4 min read 02:44 watch
  19. What are dataclasses?
    Premium Data Classes 3 min read 02:56 watch
  20. How to make a tuple
  21. Using "else" in a comprehension
    Comprehensions 3 min read 02:40 watch
  22. What are lists in Python?
    Data Structures 3 min read 02:43 watch
  23. Strings
  24. Python's getattr function
    Premium Classes 4 min read
  25. Data structures contain pointers
    Assignment and Mutation 3 min read 03:51 watch
  26. Python's __setattr__ method
    Premium Dunder Methods 4 min read
  27. Python's many command-line utilities
    Cheat Sheets 16 min read
  28. Equality versus identity
    Assignment and Mutation 4 min read 03:44 watch
  29. Assignment vs. Mutation
    Assignment and Mutation 3 min read 03:07 watch
  30. Supporting containment checks
    Premium Dunder Methods 3 min read 02:42 watch
  31. Variables are pointers
    Assignment and Mutation 3 min read 03:11 watch
  32. Overloading all attribute lookups: __getattribute__ versus __getattr__
    Premium Dunder Methods 5 min read
  33. Multiline comments
    Comments 4 min read 03:29 watch
  34. Python Big O: the time complexities of different data structures
  35. Python's http.server module
    Other 3 min read 02:00 watch
  36. Unnecessary else statements
    Conditionals 3 min read 02:16 watch
  37. Every dunder method
  38. List slicing
  39. The contextmanager decorator
    Premium Context Managers 8 min read 05:33 watch
  40. Arithmetic Dunder Methods
  41. The list insert method
    Premium Data Structures 5 min read 05:40 watch
  42. TextIOWrapper‽ converting files to strings
    Other 3 min read
  43. None
    Overlooked Fundamentals 3 min read 03:01 watch
  44. Goose typing
    Premium Dunder Methods 8 min read
  45. Using the Python REPL
    Overlooked Fundamentals 4 min read 03:54 watch

2023

  1. Chained comparisons
    Premium Conditionals 3 min read 02:45 watch
  2. zip with different length iterables
    Premium Looping 4 min read 03:13 watch
  3. Descriptors
    Premium Dunder Methods 11 min read
  4. Inspect modules interactively
    Premium Debugging 2 min read 02:09 watch
  5. Working with JSON data
    Premium Files 4 min read 04:02 watch
  6. Solving programming exercises
    Other 7 min read
  7. Booleans are integers
    Premium Conditionals 2 min read 02:20 watch
  8. Reading from standard input
    Premium Files 4 min read 03:25 watch
  9. Python's lambda functions
    Functions 5 min read
  10. What are metaclasses?
    Premium Dunder Methods 4 min read 04:37 watch
  11. Python's assert statement
    Premium Debugging 5 min read 04:06 watch
  12. Are dictionaries ordered in Python?
    Premium Data Structures 3 min read 02:45 watch
  13. What is recursion?
    Functions 6 min read 04:13 watch
  14. Python's range is a lazy sequence
    Premium Looping 4 min read 02:55 watch
  15. Using "else" with a loop
    Premium Looping 3 min read
  16. Reserved words
    Premium Overlooked Fundamentals 3 min read 02:23 watch
  17. Creating a context manager
    Context Managers 7 min read 04:56 watch
  18. Using attributes on classes
    Premium Classes 3 min read 03:00 watch
  19. Python's next() function
  20. The difference between return and print
    Functions 4 min read 03:53 watch
  21. Django June 2023: Tips & Discussions
    Other 3 min read
  22. Counting occurrences in Python with collections.Counter
  23. Fixing circular imports
    Premium Modules 9 min read 05:09 watch
  24. Substrings in Python: checking if a string contains another string
    Strings 6 min read
  25. How to assign a variable
    Assignment and Mutation 3 min read 03:13 watch
  26. Short-circuit evaluation
    Premium Conditionals 4 min read 03:41 watch
  27. Dynamically importing modules
    Premium Modules 4 min read 03:47 watch
  28. How to make a sequence
    Premium Dunder Methods 7 min read 03:40 watch
  29. Python's any() and all() functions
  30. Implementing slicing
    Premium Dunder Methods 5 min read 04:03 watch
  31. What is a context manager?
    Context Managers 3 min read 02:35 watch
  32. Function overloading
    Premium Functions 4 min read 02:54 watch
  33. Remove duplicates from a list
  34. Looping over dictionaries
    Premium Data Structures 3 min read 02:13 watch
  35. What is a mapping?
    Premium Data Structures 3 min read 03:07 watch
  36. Python's list constructor: when and how to use it
  37. Writing a CSV file
    Premium Files 5 min read 04:42 watch
  38. Conditional operators
    Conditionals 3 min read 02:00 watch
  39. Reading a CSV file
    Files 4 min read 03:21 watch
  40. Removing a dictionary key
    Premium Data Structures 4 min read 02:54 watch
  41. Singletons
    Classes 5 min read 04:28 watch

2022

  1. Python's "if" statement
    Conditionals 2 min read 01:51 watch
  2. Dynamically evaluating code
    Premium Other 5 min read 03:59 watch
  3. List containment checks
    Premium Data Structures 3 min read 01:43 watch
  4. Python's ternary operator
    Conditionals 2 min read 01:57 watch
  5. breakpoint: debugging
    Cheat Sheets Debugging 6 min read 04:22 watch
  6. SyntaxError: invalid syntax
  7. How does file buffering work?
    Premium Files 5 min read 03:50 watch
  8. What does // mean in Python?
  9. Unindent multiline strings in Python with dedent
    Strings 4 min read 03:09 watch
  10. Installing Python packages with pip
    Package Management 5 min read 04:17 watch
  11. Fixing TypeError: can only concatenate str (not "int") to str
  12. reduce() in Python and why to avoid it
    Cheat Sheets Looping 4 min read 03:45 watch
  13. Creating a mapping
    Premium Dunder Methods 6 min read 04:26 watch
  14. What's __init__.py?
    Premium Modules 3 min read 03:16 watch
  15. Python's String Methods
  16. How not to use super
    Premium Inheritance 4 min read 02:56 watch
  17. When should you call super?
    Premium Inheritance 3 min read 02:35 watch
  18. Title-case a String
    Strings 5 min read
  19. Using pip requirements files
    Premium Package Management 5 min read 03:03 watch
  20. Using virtual environments
    Package Management 6 min read 03:57 watch
  21. When to use NotImplemented
    Premium Dunder Methods 4 min read 03:40 watch
  22. How I made a dataclass remover
    Data Classes 12 min read
  23. Appreciating Python's match-case by parsing Python code
    Conditionals 9 min read
  24. Python's setattr function and __setattr__ method
    Other 5 min read
  25. When is equality the same as identity?
    Premium Assignment and Mutation 6 min read 04:55 watch
  26. Catching all exceptions
    Premium Exceptions 4 min read 02:50 watch
  27. Callables: Python's "functions" are sometimes classes
    Functions 10 min read
  28. Seeking in files
    Premium Files 5 min read 04:18 watch
  29. Reading binary files
    Files 4 min read 03:47 watch
  30. File modes
    Premium Cheat Sheets Files 5 min read 03:34 watch
  31. Flatten a list of lists
  32. Making hashable objects
    Premium Dunder Methods 6 min read 04:34 watch
  33. Unicode character encodings
    Files 4 min read 02:58 watch
  34. What is "hashable" in Python?
    Dunder Methods 5 min read 03:25 watch
  35. Python f-string tips & cheat sheets
  36. Static methods
    Premium Classes 4 min read 02:44 watch
  37. Class methods
    Premium Classes 4 min read 03:47 watch
  38. How to make an iterator
    Premium Generator Functions 5 min read 03:45 watch
  39. How to make an iterable
    Premium Dunder Methods Generator Functions 3 min read 02:21 watch
  40. What is an iterator?
    Generator Functions 5 min read 03:53 watch
  41. Built-in Functions
  42. How to create a generator function
    Generator Functions 2 min read 02:08 watch
  43. Variables and objects
  44. What is a generator function?
    Generator Functions 4 min read 03:58 watch
  45. Exiting a Python program
    Modules 6 min read 05:45 watch
  46. Dunder variables
  47. Making the len function work on your Python objects
    Dunder Methods 2 min read 01:54 watch
  48. Supporting index and key lookups
    Dunder Methods 2 min read 01:25 watch
  49. How to remove spaces
    Strings 3 min read
  50. Catching multiple exception types
    Premium Exceptions 6 min read 03:55 watch
  51. What can you do with exception objects?
    Premium Exceptions 2 min read 02:03 watch
  52. How to raise an exception
    Exceptions 5 min read 03:12 watch
  53. Python's try-except blocks
    Exceptions 4 min read 03:20 watch
  54. dataclasses
  55. Deciphering Python's Traceback (most recent call last)
    Exceptions 5 min read 03:39 watch

2021

  1. Representing binary data with bytes
    Strings Files 3 min read 03:25 watch
  2. Converting datetime to UTC
    datetime 1 min read
  3. Overloading equality
    Dunder Methods 4 min read 03:34 watch
  4. Making a lazy attribute
    Premium Properties 3 min read 02:35 watch
  5. Locally testing Python Morsels exercises
    Other 5 min read
  6. Convert a list to a string
    Strings 3 min read 03:04 watch
  7. Positional-only function arguments
    Premium Functions 4 min read 04:08 watch
  8. Unpacking iterables into iterables
    Premium Overlooked Fundamentals Asterisks 3 min read 02:35 watch
  9. Unpacking iterables into function arguments
    Premium Functions Asterisks 2 min read 01:49 watch
  10. Extended iterable unpacking
    Premium Tuple Unpacking Asterisks 3 min read 02:49 watch
  11. Importing everything from a module
    Premium Modules 6 min read 04:22 watch
  12. Modules are cached
    Modules 3 min read 02:36 watch
  13. File-like objects
    Premium Files 3 min read 02:53 watch
  14. Printing to a file
    Premium Files 3 min read 02:52 watch
  15. Write to a file
    Files 3 min read 02:54 watch
  16. Files are iterators
    Premium Files 3 min read 02:49 watch
  17. Read a file line-by-line
    Files 3 min read 01:52 watch
  18. How to read from a text file
    Files 3 min read 03:03 watch
  19. Defining a main function
    Command-Line Progarms 3 min read 02:53 watch
  20. Tuple unpacking isn't just for tuples
    Premium Tuple Unpacking 3 min read 03:08 watch
  21. Importing a module runs code
    Modules 4 min read 03:16 watch
  22. Decorators aren't always functions
    Premium Decorators 6 min read 04:29 watch
  23. Parsing command-line arguments
    Command-Line Progarms 5 min read 04:16 watch
  24. Making a class decorator
    Premium Decorators 2 min read 02:31 watch
  25. Accessing command-line arguments
    Command-Line Progarms 4 min read 03:14 watch
  26. Python's walrus operator
    Assignment and Mutation 4 min read 03:42 watch
  27. Raw strings
    Premium Strings 2 min read 01:52 watch
  28. Customizing what happens when you assign an attribute
    Properties 4 min read 03:43 watch
  29. Making a read-only attribute
    Properties 4 min read 03:31 watch
  30. What can you do with generator expressions?
    Premium Generator Expressions 5 min read 04:02 watch
  31. Python's map and filter functions
    Generator Expressions 5 min read 04:39 watch
  32. Generators are iterators
    Premium Generator Expressions 3 min read 03:00 watch
  33. Turning a list comprehension into a generator expression
    Premium Generator Expressions 3 min read 03:13 watch
  34. How to write a generator expression
    Generator Expressions 4 min read 03:54 watch
  35. Augmented assignments mutate
    Premium Assignment and Mutation 3 min read 03:11 watch
  36. Mutable tuples
    Premium Assignment and Mutation 3 min read 03:23 watch
  37. Making a decorator that accepts arguments
    Premium Decorators 4 min read 03:05 watch
  38. Module versus Script
  39. Making a well-behaved decorator
    Premium Decorators 4 min read 03:17 watch
  40. How to make a decorator
    Decorators 5 min read 05:02 watch
  41. What is a decorator?
    Decorators 5 min read 04:56 watch
  42. Passing functions as arguments to other functions
    Decorators 3 min read 02:52 watch
  43. The meaning of "callable"
    Decorators 3 min read 02:04 watch
  44. Mutating with an assignment statement
    Premium Assignment and Mutation 2 min read 02:17 watch
  45. When should you not use a list comprehension?
    Premium Comprehensions 3 min read 03:14 watch
  46. Turning a for loop into a list comprehension
    Comprehensions 6 min read 04:28 watch
  47. Why use a list comprehension?
    Premium Comprehensions 3 min read 02:31 watch
  48. Breaking up long lines of code
    Overlooked Fundamentals 4 min read 03:01 watch
  49. Where does Python look for methods?
    Premium Classes 4 min read 03:22 watch
  50. Set and dictionary comprehensions
    Premium Comprehensions 4 min read 03:19 watch
  51. List comprehensions
    Comprehensions 3 min read 02:24 watch
  52. 4 ways to import a module
    Modules 4 min read 04:09 watch
  53. Making an auto-updating attribute
    Properties 3 min read 02:28 watch
  54. The assignments hiding in your functions
    Premium Assignment and Mutation Functions 3 min read 03:25 watch
  55. Does Python have constants?
    Assignment and Mutation 3 min read 02:51 watch
  56. How attribute lookups and assignments work
    Premium Classes 3 min read 03:35 watch
  57. Truthiness
  58. Deep tuple unpacking
    Premium Tuple Unpacking 4 min read 03:45 watch
  59. Tuple unpacking
    Tuple Unpacking 3 min read 03:17 watch
  60. Importing a module
    Modules 2 min read 02:02 watch
  61. Assignment isn't just about the equals sign
    Premium Assignment and Mutation 3 min read 03:33 watch
  62. Inheriting one class from another
    Classes Inheritance 4 min read 04:08 watch
  63. Methods are just functions attached to classes
    Premium Classes 4 min read 05:02 watch
  64. Everything is an object
    Overlooked Fundamentals 4 min read 03:49 watch
  65. Pass: Python's no-op
    Premium Overlooked Fundamentals 3 min read 02:44 watch
  66. Docstrings
    Comments Classes 4 min read 04:43 watch
  67. Attributes are everywhere
    Premium Classes 2 min read 02:30 watch
  68. What is __init__ in Python?
    Classes 2 min read 03:09 watch
  69. Each module has its own global scope
    Premium Variable Scope 2 min read 02:43 watch
  70. Scope is about assignment, not mutation
    Premium Variable Scope 2 min read 03:12 watch
  71. String concatenation vs string interpolation
    Strings 2 min read 03:03 watch
  72. Assigning to global variables
    Premium Variable Scope 3 min read 04:23 watch
  73. Local and global variables
    Variable Scope 3 min read 04:17 watch
  74. Customizing the string representation of your objects
    Dunder Methods 3 min read 03:28 watch
  75. Dunder methods
    Dunder Methods 4 min read 03:58 watch

2020

  1. Python's 2 different string representations
    Strings 3 min read 03:11 watch
  2. Python's self
    Classes 3 min read 03:28 watch
  3. Classes are everywhere
    Classes 3 min read 03:14 watch
  4. What is a class?
    Classes 3 min read 04:34 watch
  5. Accepting arbitrary keyword arguments
    Functions Asterisks 3 min read 03:07 watch
  6. Keyword-only function arguments
    Functions Asterisks 4 min read 04:12 watch
  7. Sequences
  8. Accepting any number of arguments to a function
    Functions Asterisks 3 min read 03:02 watch
  9. How to make a function
    Functions 4 min read 04:26 watch
  10. Positional vs keyword arguments
    Functions 3 min read 03:05 watch
  11. How to call a function
    Functions 2 min read 02:17 watch
  12. Python doesn't have type coercion
    Overlooked Fundamentals 2 min read 02:31 watch
  13. Python's zip function
    Looping 3 min read 02:40 watch
  14. Looping with indexes
    Looping 4 min read 03:17 watch
  15. What is an iterable?
    Looping 2 min read 01:45 watch
  16. Python's "for" loop
    Looping 3 min read 02:50 watch
  17. String Representations for Classes
    Classes 6 min read
  18. Duck Typing
  19. The Iterator Protocol
    Other 4 min read
  20. Zipping an Iterator to Itself
    Other 3 min read

No matches

Try clearing your search or removing the topic filter.

Profile picture of Trey

Learn something new about Python every week

My name is Trey Hunner. I publish new Python articles and screencasts every week through Python Morsels. If you want to learn something new about Python every week, join Python Morsels!

Join Python Morsels ✨