Think Python: How to think like a Computer Scientist

think python how to think like a computer scientist pdf

Learn to program in Python, and start your journey into Software Development with Think Python: How to think Like a Computer Scientist

The following is a review of the book Think Python: How to Think Like a Computer Scientist by Allen B.Downey.


Think Python is one of the greatest books for learning how to program in Python out there. It presents an introduction to computer science, covering the most basic concepts that are common to most languages like variables, data structures, functions, conditionals, and flow control, while visiting software engineering concepts like interface design, GUI based programs, debugging, program development, basic algorithms, and algorithmic complexity.

While books like ‘Automating the boring stuff with Python’ or ‘Python Crash Course‘ are a great way to gets your hands dirty and start coding in no time, they lack computer science and software development concepts and methodologies that are fundamental for professional coding.

Think Python solves this issue by going to a middle ground between a highly practical book (exercises in every chapter and some awesome case studies) and one that teaches the fundamental concepts of software development. While ‘Automating the boring stuff ‘ or ‘Python Crash Course‘ are more of ‘learn Python in X days’ books, Think Python is more oriented towards people that want to become proper developers, hence the subtitle ‘How to Think Like a Computer Scientists‘.

If you want to learn how to program, working with Python is an excellent way to start. This hands-on guide takes you through the language a step at a time, beginning with basic programming concepts before moving on to functions, recursion, data structures, and object-oriented design.

Through exercises in each chapter, you’ll try out programming concepts as you learn them. Think Python is ideal for students at the high school or college level, as well as self-learners, home-schooled students, and professionals who need to learn programming basics. Beginners just getting their feet wet will learn to program in python within a browser and:

  • Start with the basics, including language syntax and semantics
  • Get a clear definition of each programming concept
  • Learn about values, variables, statements, functions, and data structures in a logical progression
  • Discover how to work with files and databases
  • Understand objects, methods, and object-oriented programming
  • Use debugging techniques to fix syntax, runtime, and semantic errors
  • Explore interface design, data structures, and GUI-based programs through case studies

The text builds a great progression for learning to program in Python in an easy to follow manner, and using non-trivial and insightful examples that will teach you to think about the language itself and consolidate the knowledge retrieved from the book deep into your brain. We think this is a fantastic way of learning – building from scratch and then trying to get you to think, not just coding like a Machine.

The only caveat we found in this text is that many of the coding exercises are math related, and while they are not hard (if you have a basic background you will be fine), if you do hate math, you will not enjoy them. If this part is an issue for you, we deeply recommend that you complete the exercises and the case studies to really grasp and get the most out of the book.

If you do so, Think Python will set you up for solving a lot of programming tasks.


The contents of the book are the following:

  • Preface
  • 1. The Way of the Program
  • 2. Variables, Expressions and Statements
  • 3. Functions
  • 4. Case Study: Interface Design
  • 5. Conditionals and Recursion
  • 6. Fruitful Functions
  • 7. Iteration
  • 8. Strings
  • 9. Case Study: Word Play
  • 10. Lists
  • 11. Dictionaries
  • 12. Tuples
  • 13. Case Study: Data Structure Selection
  • 14. Files
  • 15. Classes and Objects
  • 16. Classes and Functions
  • 17. Classes and Methods
  • 18. Inheritance
  • 19. The Goodies
  • 20. Debugging
  • 21. Analysis of Algorithms

The book is freely available o PDF on the authors official website, and comes along with a GitHub repository where the code used and examples can be found. The PDF can be found here. And here is the GitHub Repository.

We like having books on Paperback, to write, comment, and have as manuals next to where we work, but having the text available on PDF is really awesome to increase the reach of the text and allow anyone to learn from it.


Think Python: How to think Like a Computer Scientist is an amazing book for going into serious software development with Python. It is oriented for beginners and people that want to program in python from scratch, but that have the goal of becoming a full software developer.

Because of this, our feeling is that first one could pick up a book like ‘Automating the boring stuff ‘ or ‘Python Crash Course‘ to quickly and painlessly learn to program, then read Think Python to pick up fundamental software development skills, and then finish with a book that teaches the most used libraries in Python like ‘The Hitchhiker’s Guide to Python‘ if you are interested in general software development or ‘The Python for Data Science handbook’ if what you are looking for is going into Data Science or Machine Learning.

Anyhow, if you want to learn to program in Python for proper software development, then this is the book for you: it is short, up to the point, lucid, practice oriented, and you can even download it freely online! If you want a paperback copy however, you can find it on Amazon here:

Think Python: How to Think Like a Computer Scientist
  • Downey, Allen B. (Author)
  • English (Publication Language)
  • 292 Pages - 01/12/2016 (Publication Date) - O'Reilly Media (Publisher)

We hope you enjoyed the review, thanks for reading and have fun coding!

Spread the love!