Free Programming Books

46 Excellent Free Books to Learn Python

Python is a high-level, general-purpose, structured, powerful, open source programming language that’s used for a wide variety of programming tasks. It features a fully dynamic type system and automatic memory management, similar to that of Scheme, Ruby, Perl, and Tcl, avoiding many of the complexities and overheads of compiled languages. The language was created by Guido van Rossum in 1991, and continues to grow in popularity, in part because it is easy to learn with a readable syntax. The name Python derives from the sketch comedy group Monty Python, not from the snake.

Python is a versatile language. It’s frequently used as a scripting language for web applications, embedded in software products, as well as artificial intelligence and system administration tasks. It’s both simple and powerful, perfectly suited for beginners and professional programmers alike.

This article selects an extensive range of high quality free Python books. Readers are presented with a diverse set of books with general texts designed for beginners, intermediate, and advanced programmers. More task-specific books are featured too. For example, a few of the books focus on writing Python games. Python is very popular in scientific fields, so a smattering of scientific focused titles are presented too. The majority of the books are released under an open source license. We’ve also published a compilation of the best free Python tutorials.

We’ve also published an introductory training session on the use of Python for data science.

1. Think Python 2nd Edition by Allen B. Downey

Think Python 2nd EditionIf you’re looking for an introduction to Python, look no further than Think Python.

This book begins with basic concepts of programming, and is carefully designed to define all terms when they are first used and to develop each new concept in a logical progression. Larger pieces, like recursion and object-oriented programming are divided into a sequence of smaller steps and introduced over the course of several chapters.

There’s a chapter that explores some powerful Python features.

Think Python 2e is a free book. It’s available under the Creative Commons Attribution-NonCommercial 3.0 Unported License, which means that you are free to copy, distribute, and modify it, as long as you attribute the work and don’t use it for commercial purposes.

Read the book

2. Dive Into Python 3 by Mark Pilgrim

Dive Into Python 3Dive Into Python 3 covers Python 3 and its differences from Python 2.

As in the original book, Dive Into Python, each chapter starts with a real, complete code sample, proceeds to pick it apart and explain the pieces, and then puts it all back together in a summary at the end.

This book includes:

  • Example programs completely rewritten to illustrate powerful new concepts now available in Python 3: sets, iterators, generators, closures, comprehensions, and much more.
  • A detailed case study of porting a major library from Python 2 to Python 3.
  • A comprehensive appendix of all the syntactic and semantic changes in Python 3.

The book is freely licensed under the Creative Commons Attribution Share-Alike license. You can download it as HTML or PDF. And there’s a paperback available to buy.

Read the book

3. The Hitchhiker’s Guide to Python! by Kenneth Reitz & Tanya Schlusser

The Hitchhiker’s Guide to Python!The Hitchhiker’s Guide to Python! provides both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis.

This guide, collaboratively written by over a hundred members of the Python community, describes best practices currently used by package and application developers. Unlike other books for this audience, The Hitchhiker’s Guide is light on reusable code and heavier on design philosophy, directing the reader to excellent sources that already exist.

This book is released under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Read the book

4. Automate the Boring Stuff with Python by Al Sweigart

Automate the Boring Stuff with PythonIn Automate the Boring Stuff with Python, you’ll learn how to use Python to write programs that do in minutes what would take you hours to do by hand-no prior programming experience required.

Once you’ve mastered the basics of programming, you’ll create Python programs that effortlessly perform useful and impressive feats of automation to:

  • Search for text in a file or across multiple files.
  • Create, update, move, and rename files and folders.
  • Search the Web and download online content.
  • Update and format data in Excel spreadsheets of any size.
  • Split, merge, watermark, and encrypt PDFs.
  • Send reminder emails and text notifications.
  • Fill out online forms.

Step-by-step instructions walk you through each program, and practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks.

The book is free to read and published under a Creative Commons license.

Read the book

5. Functional Programming in Python by David Mertz

Functional Programming in PythonFunctional Programming in Python takes the reader on a tour of Python’s features suitable for implementing programs in a functional style.

After an introduction to the concepts of functional programming, the author looks at language features such as iterators and generators and relevant library modules such as itertools and functools.

Functional Programming in Python is published under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Read the book

Next page: Page 2 – Supporting Python 3 and more books

Pages in this article:
Page 1 – Think Python and more books
Page 2 – Supporting Python 3 and more books
Page 3 – Invent Your Own Computer Games with Python and more books
Page 4 – Making Games with Python & Pygame and more books
Page 5 – Hacking Secret Ciphers with Python and more books
Page 6 – How to Make Mistakes in Python and more books
Page 7 – Text Processing in Python and more books
Page 8 – The Coder’s Apprentice and more books
Page 9 – Building Skills in Object-Oriented Design and more books

All books in this series:

Free Programming Books
JavaGeneral-purpose, concurrent, class-based, object-oriented, high-level language
CGeneral-purpose, procedural, portable, high-level language
PythonGeneral-purpose, structured, powerful language
C++General-purpose, portable, free-form, multi-paradigm language
C#Combines the power and flexibility of C++ with the simplicity of Visual Basic
JavaScriptInterpreted, prototype-based, scripting language
PHPPHP has been at the helm of the web for many years
HTMLHyperText Markup Language
SQLAccess and manipulate data held in a relational database management system
RubyGeneral purpose, scripting, structured, flexible, fully object-oriented language
AssemblyAs close to writing machine code without writing in pure hexadecimal
SwiftPowerful and intuitive general-purpose programming language
GroovyPowerful, optionally typed and dynamic language
GoCompiled, statically typed programming language
PascalImperative and procedural language designed in the late 1960s
PerlHigh-level, general-purpose, interpreted, scripting, dynamic language
RDe facto standard among statisticians and data analysts
COBOLCommon Business-Oriented Language
ScalaModern, object-functional, multi-paradigm, Java-based language
FortranThe first high-level language, using the first compiler
ScratchVisual programming language designed for 8-16 year-old children
LuaDesigned as an embeddable scripting language
LogoDialect of Lisp that features interactivity, modularity, extensibility
RustIdeal for systems, embedded, and other performance critical code
LispUnique features - excellent to study programming constructs
AdaALGOL-like programming language, extended from Pascal and other languages
HaskellStandardized, general-purpose, polymorphically, statically typed language
SchemeA general-purpose, functional language descended from Lisp and Algol
PrologA general purpose, declarative, logic programming language
ForthImperative stack-based programming language
ClojureDialect of the Lisp programming language
JuliaHigh-level, high-performance language for technical computing
AwkVersatile language designed for pattern scanning and processing language
CoffeeScriptTranscompiles into JavaScript inspired by Ruby, Python and Haskell
BASICBeginner’s All-purpose Symbolic Instruction Code
ErlangGeneral-purpose, concurrent, declarative, functional language
VimLPowerful scripting language of the Vim editor
OCamlThe main implementation of the Caml language
ECMAScriptBest known as the language embedded in web browsers
BashShell and command language; popular both as a shell and a scripting language
LaTeXProfessional document preparation system and document markup language
TeXMarkup and programming language - create professional quality typeset text
ArduinoInexpensive, flexible, open source microcontroller platform
TypeScriptStrict syntactical superset of JavaScript adding optional static typing
ElixirRelatively new functional language running on the Erlang virtual machine
F#Uses functional, imperative, and object-oriented programming methods
TclDynamic language based on concepts of Lisp, C, and Unix shells
FactorDynamic stack-based programming language
EiffelObject-oriented language designed by Bertrand Meyer
AgdaDependently typed functional language based on intuitionistic Type Theory
IconWide variety of features for processing and presenting symbolic data
XMLRules for defining semantic tags describing structure ad meaning
ValaObject-oriented language, syntactically similar to C#
Standard MLGeneral-purpose functional language characterized as "Lisp with types"
DGeneral-purpose systems programming language with a C-like syntax
Share this article

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.