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. This second edition and its supporting code have been updated for Python 3.
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 how to start with Python in a browser.
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
Allen Downey is a Professor of Computer Science at Olin College of Engineering. He has taught at Wellesley College, Colby College and U.C. Berkeley. He has a Ph.D. in Computer Science from U.C. Berkeley and Master's and Bachelor's degrees from MIT.
The animal on the cover of Think Python is the Carolina parrot, also known as the Carolina parakeet (Conuropsis carolinensis). This parrot inhabited the southeastern United States and was the only continental parrot with a habitat north of Mexico. At one time, it lived as far north as New York and the Great Lakes, although it was chiefly found from Florida to the Carolinas.
The Carolina parrot was mainly green with a yellow head and some orange coloring that appeared on the forehead and cheeks at maturity. Its average size ranged from 31–33 cm. It had a loud, riotous call and would chatter constantly while feeding. It inhabited tree hollows near swamps and riverbanks. The Carolina parrot was a very gregarious animal, living in small groups that could grow to several hundred parrots when feeding.
These feeding areas were, unfortunately, often the crops of farmers, who would shoot the birds to keep them away from the harvest. The birds’ social nature caused them to fly to the rescue of any wounded parrot, allowing farmers to shoot down whole flocks at a time. In addition, their feathers were used to embellish ladies’ hats, and some parrots were kept as pets. A combination of these factors led the Carolina parrot to become rare by the late 1800s, and poultry disease may have contributed to their dwindling numbers. By the 1920s, the species was extinct.
Today, there are more than 700 Carolina parrot specimens preserved in museums worldwide.
Many of the animals on O'Reilly covers are endangered; all of them are important to the world. To learn more about how you can help, go to animals.oreilly.com.
The cover image is from Johnson's Natural History.
This is a great summary of Python for beginners, much more approachable than the "reference" books. It will not teach you Python as well as one of the "absolute beginner" type books with more tutorials, but it will serve as a useful reference when using one of them (and long after they are discarded). Also great bonus examples of things like debugging tips, Markov chains, bisection searches, turtle, etc. You can actually sit and read this book without the need for a computer. My only complaints are that the diagrams/figures could have been a bit more plentiful and useful, and the high price for 268 pages.
Bottom Line Yes, I would recommend this to a friend
I'll admit, most of my problems with this text are centered around it being the wrong book for me personally. I'm a software developer with 25 years experience. I didn't realize this book was written in the style de jour - that is, with the goal of educating 12-year olds in the art of computer science. I'm sure the book does an admirable job in this area, but for a seasoned programmer, just say no.
Bottom Line No, I would not recommend this to a friend
I have a job writing Python today because of this book
from Portland, OR
Easy to understand
Comments about oreilly Think Python, 2nd Edition:
Downey anticipates what commonly frustrates people learning and has a mind for the minimum information to provide to make a concept clear, saving optimization for later. I think this also allows space for beginners to develop their own intuitions about how code might be improved before reading advice as canon. Downey makes a regular practice of iterating on code the reader has already seen, to make apparent the importance and ease of refactoring.
I appreciate that each chapter has its own debugging section and his more extensive treatment of the topic a separate chapter later, and just delighted in his chapter on "Goodies." The abundance of practice exercises, code examples for each chapter, and solutions provides the user sufficient (and regular) opportunity to apply what they learn.
I would like to see Think Python adapted to different learning modalities, too, though -- for people who benefit from more visual metaphors or prefer video tutorials, or other multimedia approaches used by other formats. This may not be appropriate to apply to a book whose job is indeed to be a book, but I say it with hope because Downey makes his work available with a Creative Commons license. May other people who love this book as much as I do feel free to riff on it!
Bottom Line Yes, I would recommend this to a friend