Series 16 parts

Learn Python by Doing: From Your First Script to Real Projects

A 16-part beginner-to-advanced Python syllabus: every lesson has runnable code in the browser, quizzes, and a matching topic in the free Learn Python Android app.

This is a complete Python syllabus, not a collection of tips. The track starts from your very first script and climbs one honest step at a time: variables, decisions, loops, functions, data structures, objects, files, the standard library, generators, type hints, real data work, concurrency, and testing. The last three parts open the door to machine learning with scikit-learn, deep learning with TensorFlow and Keras, and a first look at large language models. Every lesson has Python you can run right in the page, quiz checkpoints to make sure ideas stick, and a matching topic in the free Learn Python Android app so you can keep practicing offline.

In this series

  1. 1 Python for Absolute Beginners: Your First Script, Variables, and Types Lesson 1 of a complete Python course: install Python, run your first script, and master variables, core data types, f-strings, and input, with a live in-page playground and quizzes.
  2. 2 Python Operators and Decision Making: if, elif, else, and match Lesson 2: give your Python programs a brain with operators, truthiness, if/elif/else ladders, conditional expressions, and the modern match statement, with a live playground and quizzes.
  3. 3 Python Loops and Flow Control: for, while, break, and continue Lesson 3: master repetition with while, for, range, break, continue, loop else, nested loops, and the accumulator pattern, including FizzBuzz and a live playground with exercises.
  4. 4 Python Functions Explained: Arguments, Returns, Scope, and Lambdas Lesson 4: turn scripts into reusable tools with def, arguments and defaults, return values, scope rules, *args and **kwargs, docstrings, and lambdas, with refactoring exercises in a live playground.
  5. 5 Python Data Structures: Lists, Tuples, Sets, Dicts, and Comprehensions Lesson 5: lists, tuples, sets, and dictionaries, how to choose between them, and the comprehensions, enumerate, and zip idioms that make Python feel like Python, with a word-counter project.
  6. 6 Object-Oriented Python: Classes, Inheritance, and Dataclasses Lesson 6: object-oriented Python without the fear: classes, __init__ and self, dunder methods, inheritance versus composition, and modern dataclasses, with an inventory project in the playground.
  7. 7 Python Exceptions and File Handling: Code That Survives Bad Input Lesson 7: write Python that survives bad input: tracebacks, try/except done right, raising custom exceptions, and safe file reading and writing with the with statement, practiced on messy data.
  8. 8 Python Modules, Packages, and a Standard Library Tour Lesson 8: imports demystified, your own modules and packages, pip and virtual environments, then a working tour of math, random, datetime, Counter, defaultdict, and pathlib, ending in a file organizer project.
  9. 9 Python Iterators and Generators: Lazy Evaluation Done Right Lesson 9: the machinery behind every for loop, then generators with yield, lazy generator expressions, infinite sequences, and constant-memory data pipelines, finished with a log analyzer project.
  10. 10 Python Type Hints for Beginners: Code That Explains Itself Lesson 10: make Python explain itself with type hints: annotations, typed collections, unions with None, type aliases, and a type checker that finds bugs before you run anything.
  11. 11 Working with Text and Data in Python: Regex, JSON, and CSV Lesson 11: turn messy text into structured data: a practical regex core, JSON round trips, CSV with DictReader, and a complete validate-and-transform pipeline from CSV to clean JSON.
  12. 12 Python Concurrency Basics: Threads, Processes, and asyncio Lesson 12: a clear, honest introduction to Python concurrency: I/O-bound versus CPU-bound, ThreadPoolExecutor, the GIL without panic, multiprocessing, and asyncio with gather, run live in the browser.
  13. 13 Testing Python Code with pytest: From First Assert to Real Projects Lesson 13: prove your code works with pytest: asserts, test discovery, world-class failure reports, parametrize for edge cases, raises and tmp_path, and the red-green-refactor rhythm, with a runnable micro test suite.
  14. 14 Machine Learning Foundations in Python: First Models with scikit-learn Lesson 14: train your first real machine learning models with scikit-learn: features and labels, train/test splits, fit/predict/score, a decision tree you can read, k-nearest-neighbors, and overfitting, live in the browser.
  15. 15 Deep Learning Basics in Python: Neural Networks with TensorFlow and Keras Lesson 15: deep learning without hand-waving: what neurons compute, loss and gradient descent, backpropagation built by hand in NumPy in the browser, and a complete Keras Fashion MNIST classifier with dropout and transfer learning.
  16. 16 A Practical Introduction to LLMs and RAG in Python, and Where to Go Next The finale: LLMs explained with the concepts you already own, tokens and prompts, your first Claude API call from Python, a toy RAG engine in the browser, and the full map into the production LLM and MCP series.