Python
Step-by-step Python tutorials — ordered lessons from basics to advanced.
Lesson outline
-
13
Control Flow: if, elif, else
Learn decision-making in Python using if, elif, and else statements. Step-by-step tutorial with hands-on exercises and edge-case troubleshooting.
-
14
List Comprehensions in Python
Learn how to write concise, readable Python code using list comprehensions. This lesson covers the core concepts, hands-on examples, and common edge cases.
-
15
Define and Call Functions
Learn how to define and call your own functions in Python with a step-by-step tutorial, hands-on exercise, and troubleshooting tips.
-
16
Function Arguments & Return Values
Understand how to pass arguments to Python functions and return values from them. Covers required, default, keyword, and variable-length arguments with hands-on examples.
-
17
Handle Errors with Try Except Finally
Learn to handle errors with try, except, and finally in Python. This lesson covers the core concept, step-by-step implementation, practical exercise, and common troubleshooting.
-
18
Read and Write Text Files
Learn to manage files: read and write text files in Python. This hands-on tutorial covers opening, reading, writing, and closing text files, with troubleshooting and practical exercises.
-
19
CSV files with csv module
Learn to read and write CSV files using Python's csv module. This step-by-step tutorial covers opening CSV files, using DictReader and DictWriter, handling headers, and common edge cases like missing values and delimiters.
-
20
Python Scope and Namespaces
Master Python scope and namespaces: how variable lookup works in LEGB rule, practical examples, and common pitfalls. Hands-on lesson for Python developers.
-
21
Import Python Modules
Learn how to import and use Python modules effectively with a step-by-step tutorial, including core concepts, hands-on exercise, troubleshooting, and next steps.
-
22
Python Standard Library Basics
Explore the Python standard library basics step by step. Learn core modules, apply them in a hands-on exercise, and connect to the next lesson in the Python track.
-
23
Write Readable Code with Comments
Learn to write readable Python code with comments and docstrings. This lesson covers best practices for inline comments, block comments, and docstrings to improve code clarity and maintainability.
-
24
Organize Code into Functions
Learn to organize Python code into reusable functions and scripts, reducing duplication and improving readability for scalable projects.
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.