Welcome to this interactive Python tutorial! This course is designed to take you from a complete beginner to a proficient Python developer, equipped with modern tools and best practices.
The tutorial is divided into 52 lessons, each covering a specific topic. Each lesson has its own directory containing two files:
instructions.md: A Markdown file with the lesson's content, explanations, and examples.exercise.py(ormain.pyfor FastAPI): A Python file with practice exercises for you to complete.
-
Navigate to a lesson directory: Start with
lesson_01. -
Read the instructions: Open the
instructions.mdfile to learn about the topic. -
Complete the exercise: Open the exercise file and write the code to complete the exercises.
-
Run your code: To run your exercise file and see the output, use the following command in your terminal, replacing
lesson_01/exercise.pywith the correct file path:python lesson_01/exercise.py
- Lesson 01: Intro to Python — Install Python, set up your environment, and write your first "Hello, World!" program.
- Lesson 02: Variables & Data Types — Learn about integers, floats, strings, and booleans.
- Lesson 03: Basic Operators — Arithmetic, comparison, and logical operators.
- Lesson 04: User Input & Type Casting — Read input from users and convert between data types.
- Lesson 05: Conditional Statements — Control flow with
if,elif, andelse. - Lesson 06: Lists — Create lists, access elements by index, and use slicing.
- Lesson 07: List Methods — Mutate and manipulate lists with built-in methods.
- Lesson 08: For Loops — Iterate over lists and ranges with
forloops. - Lesson 09: While Loops — Repeat code while a condition is true.
- Lesson 10: Dictionaries — Store and retrieve key-value pairs.
- Lesson 11: Tuples & Sets — Immutable sequences and unordered unique collections.
- Lesson 12: Defining & Calling Functions — Reuse code by writing your own functions.
- Lesson 13: Function Arguments & Return Values — Positional, keyword, and default arguments; returning data.
- Lesson 14: Variable Scope — Understand local vs. global scope and the
globalkeyword. - Lesson 15: Modules & Importing — Use the standard library and import your own modules.
- Lesson 16: File I/O Reading — Open and read text files with Python.
- Lesson 17: File I/O Writing — Write and append data to files.
- Lesson 18: Error Handling — Catch and handle exceptions with
try,except, andfinally. - Lesson 19: OOP Intro — Introduction to classes, objects, attributes, and methods.
- Lesson 20: Next Steps — Review your progress and explore project ideas to keep learning.
- Lesson 21: OOP Inheritance — Extend classes and reuse code through inheritance.
- Lesson 22: OOP Polymorphism — Override methods and use polymorphism for flexible code.
- Lesson 23: OOP Encapsulation — Control access with public, protected, and private attributes.
- Lesson 24: OOP Dunder Methods — Customise objects with magic methods like
__str__and__len__. - Lesson 25: Static and Class Methods — Use
@staticmethodand@classmethoddecorators. - Lesson 26: List Comprehensions — Write concise list transformations in a single expression.
- Lesson 27: Dict and Set Comprehensions — Apply the comprehension pattern to dictionaries and sets.
- Lesson 28: Lambda Functions — Create small anonymous functions with
lambda. - Lesson 29: Map Filter Reduce — Functional-style data processing with
map(),filter(), andreduce(). - Lesson 30: Generators — Produce values lazily with generator functions and the
yieldkeyword. - Lesson 31: Decorators — Wrap and enhance functions using decorators.
- Lesson 32: Collections Module — Powerful container types:
Counter,defaultdict,deque, and more. - Lesson 33: Dates and Times — Parse, format, and calculate dates and times with the
datetimemodule. - Lesson 34: JSON Data — Serialize and deserialize JSON data with the
jsonmodule. - Lesson 35: OS and Sys Modules — Navigate the filesystem and interact with the OS using
osandsys. - Lesson 36: Multithreading — Run tasks concurrently with the
threadingmodule. - Lesson 37: Multiprocessing — Achieve true parallelism with the
multiprocessingmodule. - Lesson 38: Asyncio Intro — Understand the event loop and the basics of
asyncio. - Lesson 39: Async Await — Write clean asynchronous I/O code with
asyncandawait. - Lesson 40: Advanced Project — Build a capstone project that combines everything you've learned.
- Lesson 41: Requests Module —
requests- Make HTTP requests to APIs and websites. - Lesson 42: BeautifulSoup4 —
BeautifulSoup4- Parse HTML and scrape web pages. - Lesson 43: Pandas —
pandas- Powerful data analysis and manipulation. - Lesson 44: Matplotlib —
matplotlib- Create charts and data visualisations. - Lesson 45: Seaborn —
seaborn- High-level statistical data visualisation. - Lesson 46: FastAPI —
FastAPI- Build high-performance web APIs with automatic docs.
- Lesson 47: Git and GitHub — Track changes and collaborate using Git & GitHub.
- Lesson 48: Pytest — Write and run automated tests with
pytest. - Lesson 49: Ruff — Keep code clean with fast formatting and linting via
ruff. - Lesson 50: UV Dependency Management — Manage virtual environments and dependencies with
uv. - Lesson 51: Databases — Store and query data with
SQLAlchemyandSQLite. - Lesson 52: Config Management — Manage secrets and settings safely using
.envfiles.
Happy learning!
