Python
Step-by-step Python tutorials — ordered lessons from basics to advanced.
Lesson outline
-
37
Use with statement
Learn to use the with statement for resource management in Python — a practical tutorial with hands-on steps, troubleshooting, and what to study next.
-
38
Generator Functions
Learn how to create and use generator functions in Python with step-by-step instructions, hands-on exercises, and troubleshooting tips. Perfect for building efficient, memory-friendly iterators.
-
39
Yield from Generators for Streams
Master the yield from syntax in Python to efficiently chain generators for data streams. This step-by-step tutorial covers the core concept, practical walkthroughs, and common pitfalls.
-
40
Python Function Decorators
Learn to build and use decorators for functions in Python: understand the wrapper pattern, add behavior without modifying the original function, and apply decorators to logging, timing, and authentication. Includes a hands-on exercise and common troubleshooting.
-
41
Python Lambda Expressions
Master Python's lambda expressions — learn the syntax, when to use anonymous functions, and see practical examples. This lesson covers the core concept, step-by-step usage, and common pitfalls. Perfect for intermediate Python developers building functional programming skills.
-
42
Map, Filter, and Reduce in Python
Learn map, filter, and reduce for data processing in Python — hands-on steps, troubleshooting, and next lesson.
-
43
Zipped & Rotated Iterables
Learn to work with zipped and rotated iterables in Python — practical steps, troubleshooting, and what comes next.
-
44
Operate on files with os and pathlib
Learn to operate on files with os and pathlib in this hands-on Python tutorial.
-
45
Manage Directories with shutil and glob
Learn how to manage directories in Python using shutil and glob — covering creation, copying, moving, deleting, and pattern matching files for efficient file system operations.
-
46
Parse CLI args with argparse
Learn how to parse command-line arguments with argparse in this step-by-step Python tutorial for progressive mastery.
-
47
Custom Exception Classes
Learn to define and raise custom exception classes in Python to handle errors more specifically and improve code readability.
-
48
Assertions for Defensive Programming
Learn to use Python assertions for defensive programming. This lesson covers when and how to assert assumptions, prevent bugs early, and includes practical exercises with edge cases.
Python — step-by-step tutorials
What you will find here
This track walks through python in order — each lesson is server-rendered HTML you can read without JavaScript. Follow the outline, then practice in the browser IDE when a lesson links to runnable code.
Tutorials vs quizzes and code samples
Tutorials teach in sequence. For quick checks use quizzes. For copy-paste snippets see code samples. For deeper reading browse articles.