Learning Python by Mark Lutz

One of the most complete books for learning how to program in Python.

learning python book mark lutz

Thinking about Learning Python? Then you should check out the following review of the book Learning Python by Mark Lutz.

Learning Python by Mark Lutz review: who should read it?

Choose Learning Python if you want a detailed explanation of the language and are willing to practise steadily. For a first project with faster visible results, a shorter project-based introduction may suit you better. This book teaches Python itself; machine-learning workflows need additional study.

Using Python for machine learning? Read the free Starter Kit excerpt on test sets before your first model. No email required; the full Starter Kit costs €19.

Review of Learning Python:

Learning Python is an easy to follow and practical book that will teach anyone with basic programming knowledge all the main concepts of Python. Full of quizzes and exercises, this self-paced book will get you writing efficient and high-quality python code.

The original review describes the 1,640-page fifth edition. A sixth edition appeared in 2025, focused on Python 3.12. Check the edition before buying: older Python 2 discussions and chapter references are not interchangeable with the revised text.

It also explains all the curiosities ans insights behind the syntax, detailing its origin, the way Python works, and what it does and how it works when it executes your code. It is also a wonderful text to have close by to freshen concepts or solve doubts. The contents of the book are described in the next section.

Illustration of the 90-day machine learning roadmap PDF

Stay on track. Get the Roadmap.

Download the 90-Day Roadmap PDF + get weekly tips and resources to help you succeed

Learning Python contents and edition differences

The outline below is a broad topic overview, not an exact table of contents for every edition. Use the author’s edition guide to match the book to its examples.

mark lutz learning python free pdf

Part I. Getting Started: Introduction, a bit of explanation of where Python came from, and the objectives of the book.

Core topics include built-in objects, statements, loops, comprehensions, functions, and scopes. Practise each concept with a small program before moving on; the introductory material alone is not a complete foundation.

Part III speaks about the different modules and packages: what they are, how to import them, etc…

Part IV exploits the Object Oriented programming Python interfaces. It introduces POO, classes, and gives some cool examples and tips on how to do this to obtain the best results.

Part V introduces the reader to exceptions and tools, what they are used for and how to manage them.

Lastly, some advanced topics like decorators, metaclasses, and different encodings are covered.

You can find all the different chapters here:

http://shop.oreilly.com/product/0636920028154.do

Summary

For beginners, compare the detailed approach here with Python Crash Course or Automate the Boring Stuff with Python. Pick one main text and spend at least as much time writing code as reading.

Its main strength is explaining why Python behaves as it does. Its main tradeoff is length: readers seeking only enough Python for a specific data project may prefer targeted chapters alongside a smaller practical guide.

A useful exercise is to write a CSV summary script, split it into functions, and test empty files and missing fields. Explain which objects are mutable and which errors your code should catch. That demonstrates understanding more clearly than finishing a page count.

After reading a book like this, you will be ready to tackle Machine Learning books and courses. Check them out here!

Learning Python by Mark Lutz

For more Python material check out our categories on Python books and Python Online Courses.

Additional online resources to learn elegant and awesome Python are:

Thanks for reading How to Learn Machine Learning and have a wonderful day!

Subscribe to our awesome newsletter to get the best content on your journey to learn Machine Learning, including some exclusive free goodies!

HOW IS MACHINE LEARNING

Leave a Comment