Python is an excellent way to get started in programming, and this clear, concise guide walks you through Python a step at a time—beginning with basic programming concepts before moving on to functions, data structures, and object-oriented design. This revised third edition reflects the growing role of large language models (LLMs) in programming and includes exercises on effective LLM prompts, testing code, and debugging skills.
With this popular hands-on guide at your side, you'll
A grounding in the syntax and semantics of the Python languageA clear definition of each programming concept, with emphasis on clear vocabularyHow to work with variables, statements, functions, and data structures in a logical progressionTechniques for reading and writing files and databasesA solid understanding of objects, methods, and object-oriented programmingDebugging strategies for syntax, runtime, and semantic errorsAn introduction to recursion, interface design, data structures, and basic algorithmsHow to use LLMs—including effective prompts, testing code, and debuggingAnd more
Allen Downey is a Professor Emeritus at Olin College and the author of a series of freetextbooks related to software and data science, including Think Python, Think Bayes, and Think Complexity, which are also published by O’Reilly Media. His blog, Probably Overthinking It, features articles on Bayesian probability and statistics. He holds a Ph.D. in computer science from U.C. Berkeley, and M.S. and B.S. degrees from MIT.
Short, up-to the point, lucid, practice-oriented, has tasks that actually make sence, structured, free on- and offline (the author's page: ). What else could a beginner ask for?
“Think Python� is available online () which means you can decide if you like it first. Personally, I wanted to write in my copy making the paper copy a great thing. Inexpensive too for a computer book. It's one of those great books I know I'll refer to again. Can't imagine why you'd buy the Kindle version though.
The book is targetted at those learning Python. It's appropriate whether you are new to programming or coming from another language. And most importantly, it is NOT a “Learn Python in X days� type book. Those have their place, but this book targets those who actually are/want to be developers. Hence the subtitle “How to Think Like a Computer Scientist.�
Each chapter ends with debugging tips, a glossary of terms and numerous exercises for practice. Common idioms are covered in addition to syntax, techniques and algorithms. Recursion is presented in a not scary, approachable way.
The author uses the term “state diagram� to refer to the state of variables in an object. I've never seen this usage before (being more used to the UML state diagram) and look forward to asking the author about it in his coderanch.com book promotion next month.
I think this makes for a great first Python book. To be followed by one that teaches the Python libraries. It teaches you how to think in Python. And how to be a developer; not just a coder.
Disclosure: I received a copy of this book from the publisher in exchange for writing this review.
As complete programming newbie, this book was a huge source of frustration and hair loss for me. However, having gone through the book, I can actually use Python, and have knowledge to build on. So, while I hated the book with a passion, it did kind of do its job.
Some of the problems with this book:
End-of-chapter exercises often involve things like solving multi-variate calculus, resulting in hours of research just trying to figure out the components of the problem. It felt like Downey was trying to scare off less mathy folks like me. After spending upwards of 10 hours a week on these exercises, I gave up on them, and just did the less involved mid-chapter exercises.
It's often unclear when Downey is building on a previous example in the chapter, as he rarely makes it explicit. On multiple occasions, my code matched his, but failed because I didn't realize he was adding to an earlier function. This resulted in more hours of anger and tears.
Finally, I still haven't fully wrapped my head around object-oriented programming, or why you'd bother with it. I suppose I know it's there, anyhow, and can draw from it later.
In sum, this book was a battle, but I made it, through sheer belligerence. I'm relieved that it's over, and that I'm now solving more relevant problems with Python.
Think Python is a relatively concise, yet a very informative and a beginner friendly guide for new programmers. This book contains a number of small examples as well as a ton of awesome exercises to practice what you learn in each chapter. Most of the examples are from math-based problems and I think people coming from a strong mathematical foundation will really love this book.
I would have given 4* but it is available in PDF FOR FREE, authorized by author/publisher ,so definitely a 5*. I'm an experienced programmer in a dozen or so languages so I read it quickly - it told me just what I wanted to know about differences between Python AS A LANGUAGE and Java, C++ . Actually, the most important reason for learning any new language these days is the packages available and this intro didn't go into that at all. Python is a full general purpose language but the main reason for choosing over similar languages is for scientific packages. A survey chapter on these would have made it 5* even at full price. I would also recommend the book for programming novices because it tells you some really useful things about introductory computer science as well; data structures and algorithms as well as object-oriented programming. Just a hint, not enough to really learn them, but so you will know they are out there and just as important as the language syntax and will dig deeper when ready.
This is an excellent book. Honestly, I have rarely seen a book as find as this. The Author describes what can only be seen as the core of all computer programming skills, and gives exercises for each.
لم أقرأ الكتاب من الجلدة للجلدة، لكنّي رجعت إليه في بعض النقاط التي أردت زيادة في فهمها أو توسعا فيها؛ إذ قرأتها بجانب الدورة أو الكورس المقدمة في موقع . أيضا حاولت حل بعض التدريبات الموجودة في نهاية كل فصل.
أسلوب الكاتب يسير في الشرح، غير معقّد، وتمارينه جميلة، ولعل أكثر ما أحببته فيه نصائحه في نهاية كل فصل عن طرق مراجعة البرنامج من الأغلاط.
This is a great book if you feel that while Youtube tutorials helped you get and idea and get the job done, they didn't/can't prepare you well for regular programming in Python. I wanted to properly learn the nuances of choosing different data structures in Python and also how to be better organized in code development. I picked this book upon recommendation from the excellent (but quite/very hard at beginner level) bootcamp . I'm really really happy how it turned out.
I'm glad that the book covers concepts in such a simple manner that after reading the book, I can somehow recall most concepts at finger tips - just because they were very nicely introduced, discussed and demonstrated.
I should say that I was a little disappointed with the book. Though it does the job of teaching you the basics of Python, this book assumes that you are not new to programming and are already a practitioner of object-oriented programming. The exercises at the end of the book are all purely mathematical and/or based on computer problems only computer students are conversant with. Towards the end, it gets all the more technical, scaring you away. Good in parts.
One of the most lucid books about Python I've read. I've been a hobbyist developer for a while this was very helpful in taking me deeper. One tip I have is to read this with a relaxed mind, not trying to rush or even complete the book, but just to pick it up and enjoy and explore whatever piece jumps out at you. Reading this slowly made it very very helpful for me.
This book provided an excellent overview of the Python language. Clearly appropriate for those with some application development experience, but I think even quite accessible for the beginner. It was well written with easily understood examples and lots of exercises (with solutions available for download). I would recommend this book to anyone wanting to learn programming with Python.
Pretty great intro for Python. Though I never got the chance to finish this since I haven't really got the need to use Tuples and Dictionaries yet. Still it was written pretty neat, easy to understand, has some sample problems with solutions at the end of each chapter. My knowledge was enough to get me start working on a Pygame so I think it was pretty solid.
Good for people new to the programming world as well as those who have experience in other languages like Java. Very easy to read and follow. A nice light weight reading on a train. It doesn't tell you everything. But it gives you enough information of the key concepts.
While this book is good for beginners, I would recommend it for those who are not ABSOLUTE beginners as I found it to be a good overview and review text for those who have had some exposure to programming concepts. There are some good exercises after each chapter that might be challenging for pure beginners, but if you're able to get through most of them, you'd have a good (beginner's) grasp of the material. I liked how the examples were presented and built on with new concepts in subsequent chapters. I stress that this is a great overview book, and so it doesn't go into too much depth about each topic--just the minimal amount for you to be able to use the idea and move on.
I am a school teacher and can tell that this is the worst textbook I have ever seen in my life. The explanations are very complicated, examples provided are heavily based on math and make very little sense to a beginner. It is such a pity that universities keep using this book for the beginning programming courses scaring students off coding. The only good thing about this book is that I did not have to buy it. It would be the worst investment ever. Don't waste your time on it. There are so many great books and online courses on Python for beginners that you can learn much more on your own.
Very clear, concise and effective. I raced through it in order to get the hang of Python's syntax - not a particularly challenging task if you're already familiar with a similar object-oriented high-level programming language (Ruby, in my case). 'Think Python' did the job well, and all the better for being available as a freely-downloadable PDF. No mention of unit testing, which is slightly shocking in this day and age. Also there's some cool stuff in Python 3.6 that isn't covered here (eg f-strings for string interpolation). Overall though a really useful book.
Clear and well structured explanation of Python / programming fundamentals. Severely held back by the website with code and solutions no longer being online, as well as the book being written for Python 2+, I’m not sure if there is an updated version available. The end of chapter exercises can be extremely difficult and often use techniques not yet discussed at that point of the book. There is a disparity between the code discussed in the chapters and the code readers are asked to write, which can often make the book demoralising.
Extremely light and bite-size introduction to programming which, nevertheless, manages to cover a lot of important topics - from definitions of different languages to analysis of algorithms. The design of the book allows one to progress one step at a time. On the other hand, it provides a lot of practical examples and self-study exercises, which are built upon the topics of current and previous chapters.
Probably the best Python textbook I’ve ever read! It is, for the most part, beginner friendly, but also taps on content and applications that can be advanced. The underlying logic of the coding language (which should be quite simple) is explained very well and succinctly. I appreciate the odd (sometimes dark) sense of humor of the author.
this was pretty good as an introduction to the language. be warned the title is very accurate and the book takes a very Computer Science approach to the lessons. i've found much more suitable to my needs as the emphasis is on results and there is less of the theory and maths problems. to be fair i did buy this book because of the beautiful parrot on the front and i still think he is lovely. i was quite upset when i read the inside back cover and saw he was extinct :(
This is the best programming intro i've ever read. At 248 pages a little longer than its successor, (218 pages), it goes into improving efficiency by using sparse matrices and hinting. I seem to recall a bit on the dangers of storing decimals in binary, but may have read an edition more recent than or .
A wonderful and concise introduction to Python, and computer programming. The examples and exercises are fun and interesting even at the early stages. The reader can get a great sense achievement by writing programs to address and analyse real-world puzzles and challenges. They will also gain confidence in writing and debugging professional code.
I've read this book to refresh my knowledge of Python. It's a very good book for junior software engineers as it does not only focus on Python itself but also on programming in general. I liked the exercises at the end of each chapter. I'm not a fan of print-driven-debugging approach and I think that this book would be even better if it also introduced a reader to writing unit tests.
Amazing book! With the help of this book and a few other resources, I was able to create a hangman game, a forest fire simulation, and encryptor, and a blackjack program all in Python. For a beginner looking to learn a programming language, use this book.
يُعتبر الكتاب مدخلا إلى البرمجة باستخدام لغة بايثون أسلوب الكتاب سهل، بسيط، غير محشو بالكثير من التفاصيل والتعقيدات مناسب للمبتدئين والراغبين في التعرف على البرمجة وأساليبها