How to Think Like a Computer Scientist

Learning with Python

by Allen Downey, Jeff Elkner and Chris Meyers.

This book is now available for sale at Hardcopies are no longer available from Green Tea Press.

How to Think... is an introduction to programming using Python, one of the best languages for beginners.

How to Think... is a Free Book available under the GNU Free Documentation License. Readers are free to copy and distribute the text; they are also free to modify it, which allows them to adapt the book to different needs, and to help develop new material.

Please send suggestions, corrections and comments about the book to feedback{at}thinkpython{dot}com.


The book is available in a variety of electronic formats:

  • Precompiled copies of the book are available in PDF and Postscript . Users are free to download and print these files.

  • The LaTeX source code for the book is available as a gzipped tar file.

  • The HTML version of the book is also available if you prefer to read it online. Or you can download all the HTML pages in a gzipped tar file.


Here are some translations of the book into other (natural) languages:

Other Free Books by Allen Downey are available from Green Tea Press.

If you are using this book and would like to make a contribution to support my work, please consider making a donation toward my web hosting bill by clicking on the icon below.

Donate towards my web hosting bill!

Are you using one of our books in a class?

We'd like to know about it. Please consider filling out this short survey.

Think DSP

Think Java

Think Bayes

Think Python 2e

Think Stats 2e

Think Complexity