Choosing a textbook for learning Python

I go through crazy phases. I get obsessed about some subject and go all in on exploring it, then get frustrated, burn out, and don’t revisit it for many months or years.

After my latest deep dive into web development with TypeScript and React, which was supposed to help me land a job as a software developer but didn’t, I wanted nothing to do with programming or computers for a while. Until now. It’s only been about… six months.

But now I want to tinker and learn again. I’m suddenly interested in learning mechanical engineering, (pre)calculus, and… Python, because Python complements engineering, math, and science perfectly. And it just feels “sciency”. Also, Project Hail Mary will be released in cinemas tomorrow, so it feels appropriate to put on a metaphorical lab coat and science the $#!7 out of… beginner mini projects like plotting basic mathematical functions and pie-charting my spendings.

I feel like a kid with Lego blocks, anew excited to build stuff. So now all I need to get started is a good book. I really enjoy learning from real, physical books. Something science-oriented with interesting, realistic problems to solve. Something not too basic because I already know some programming, but something not too difficult either because I used to resent math in high-school, didn’t touch it in college, and by extension am completely useless at it.

I am publishing my thought process in case somebody else out there might find it useful.

Selection criteria

  • The book must be fairly recent. I think anything published before 2016 might be problematic due to outdated code syntax, changes in library APIs, evolved practices, missing resources, etc. How did I get the figure 2016? I just rewound back by 10 years from now. Very scientific.
  • The book should introduce Python syntax without spending too much time explaining basic programming concepts like what a for-loop or a function is. It should move to more interesting information fairly quickly.
  • The book should feature math and science that are not too advanced so that I can still follow along with some effort. I am sure some books are so advanced that I simply won’t have the STEM background necessary to understand them.
  • The book should provide, as much as possible, problem sets and projects that simulate realistic problems that an engineer or a scientist might encounter in their daily life. Things like web scraping, databases, web APIs, testing, optimization, data visualization, graphics, math, simulation, timezones and locales, unit conversion, robotics, sensors, string manipulation, etc. I am not necessarily interested in building a computer game, unless it’s an interactive simulation, like landing a lunar module and the GUI is the lunar module’s console à-la Apollo 13!
  • The book should be reasonably priced.
  • The book should provide explanations that are thorough and do not leave the reader hanging. This means it needs to explain, as much as possible, little things that an experienced programmer might take for granted but a beginner might be confused about.
  • Bonus points if the book is not in its first edition (less errors, proven track record), is written by a reputable author, and is published by a reputable publisher.

These criteria are very specific and hard to meet (and evaluate without having actually worked through the book in question). So these criteria are more like wishlist items than strict requirements. Maybe they will serve as useful guides for evaluating the chosen book’s quality and effectiveness once I’ve read it.

Book candidates

Here are the book candidates after several Google searches and ChatGPT prompts. Lower in the post you will find my arguments for and against each book, and ultimately the choice I made.

Sorted by date, with most recently published books on top. The prices are for new paperbacks (if available), taken from Amazon.fr on 2026-03-17, unless noted otherwise. Please support local and independent bookshops! It’s also a really good idea to visit author websites because sometimes authors distribute their books for free under open licenses.

Conclusion

As I was making this choice, I noticed several things:

  • I wasted way too much time on this. This is a prime example of procrastination masked as activity/productivity. I might have been better off just picking up any of these books based on intuition alone and diving in head first.
  • Making a decision like this is quite subjective and emotional because it’s very difficult to accurately evaluate a book by simply glancing at its table of contents and reading its marketing blurb.
  • This whole exercise was motivated by my desire for completeness, risk minimization, and reduction of uncertainty. But because there are way too many book options out there, it’s virtually impossible to make a choice based on facts. In the end, you take a risk on a book and its author and you live with it. Overthinking this choice is not a wise use of one’s time.

In the end I decided to start simple with Introduction to Scientific Programming with Python by Joakim Sundnes. It’s free, short, based on lectures of a reputable professor, and will give me a better idea about what it is that I really want to accomplish by learning Python.

I will revisit this blog post once I’ve completed the book to share my opinion and to select the next one.