Python
Step-by-step Python tutorials — ordered lessons from basics to advanced.
Lesson outline
-
73
Automate File Renaming
Automate file renaming with os and shutil — Python tutorial, lesson 74. Hands-on steps, troubleshooting, and next steps.
-
74
Work with Environment Variables
Learn how to read, set, and manage environment variables using Python's os.environ module in this practical tutorial.
-
75
Python Generators
Explore Python generators: lazy iterators, generator expressions, and when to use them. Practical tutorial with examples for memory-efficient iteration.
-
76
Use itertools for efficient looping
Master itertools for efficient looping in Python. This hands-on tutorial covers core concepts, step-by-step examples, and practical exercises to optimize your loops and prepare for advanced topics.
-
77
Decorators for Cross-Cutting Concerns
Learn to implement decorators for cross-cutting concerns in Python. This lesson covers using decorators to handle logging, timing, and other aspect-oriented tasks cleanly and reuse code effectively.
-
78
Partial Functions & Caching
Apply functools.partial to fix function arguments and use caching to speed up repeated calls — a practical Python skill.
-
79
Custom Iterators: __iter__ & __next__
Learn to create custom iterators with __iter__ and __next__ in Python. Step-by-step guide with hands-on examples, troubleshooting, and next steps.
-
80
Context Managers & 'with'
Learn to use context managers and the 'with' statement in Python for resource management, with hands-on exercises and troubleshooting.
-
81
Profile with cProfile & timeit
Profile code with cProfile and timeit in Python.
-
82
Write Unit Tests with unittest
Learn to write unit tests using Python's unittest module. This hands-on lesson covers core concepts, step-by-step walkthroughs, and troubleshooting for reliable code testing.
-
83
Mock External Dependencies in Tests
Mock external dependencies in tests: learn to isolate your Python code by replacing external services and APIs with controlled mock objects. This hands-on tutorial covers the core concept, step-by-step implementation, comparison with alternatives, troubleshooting edge cases, and next steps.
-
84
Debug with pdb and post-mortem
Master debugging with pdb and post-mortem inspection in Python. This lesson covers core concepts, step-by-step walkthroughs, troubleshooting, and practical exercises for effective debugging.
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.