Programming Books

47 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 – Learn Python, Break Python and more books
Page 7 – Modeling Creativity: Case Studies in Python and more books
Page 8 – Python in Hydrology and more books
Page 9 – Tiny Python 3.6 Notebook and more books


All books in this series:

Free Programming Books
AdaALGOL-like programming language, extended from Pascal and other languages
AgdaDependently typed functional language based on intuitionistic Type Theory
ArduinoInexpensive, flexible, open source microcontroller platform
AssemblyAs close to writing machine code without writing in pure hexadecimal
AwkVersatile language designed for pattern scanning and processing language
BashShell and command language; popular both as a shell and a scripting language
BASICBeginner’s All-purpose Symbolic Instruction Code
CGeneral-purpose, procedural, portable, high-level language
C++General-purpose, portable, free-form, multi-paradigm language
C#Combines the power and flexibility of C++ with the simplicity of Visual Basic
ClojureDialect of the Lisp programming language
ClojureScriptCompiler for Clojure that targets JavaScript
COBOLCommon Business-Oriented Language
CoffeeScriptTranscompiles into JavaScript inspired by Ruby, Python and Haskell
CoqDependently typed language similar to Agda, Idris, F* and others
CrystalGeneral-purpose, concurrent, multi-paradigm, object-oriented language
CSSCSS (Cascading Style Sheets) specifies a web page’s appearance
DGeneral-purpose systems programming language with a C-like syntax
DartClient-optimized language for fast apps on multiple platforms
DylanMulti-paradigm language supporting functional and object-oriented coding
ECMAScriptBest known as the language embedded in web browsers
EiffelObject-oriented language designed by Bertrand Meyer
ElixirRelatively new functional language running on the Erlang virtual machine
ErlangGeneral-purpose, concurrent, declarative, functional language
F#Uses functional, imperative, and object-oriented programming methods
FactorDynamic stack-based programming language
ForthImperative stack-based programming language
FortranThe first high-level language, using the first compiler
GoCompiled, statically typed programming language
GroovyPowerful, optionally typed and dynamic language
HaskellStandardized, general-purpose, polymorphically, statically typed language
HTMLHyperText Markup Language
IconWide variety of features for processing and presenting symbolic data
JArray programming language based primarily on APL
JavaGeneral-purpose, concurrent, class-based, object-oriented, high-level language
JavaScriptInterpreted, prototype-based, scripting language
JuliaHigh-level, high-performance language for technical computing
KotlinMore modern version of Java
LabVIEWDesigned to enable domain experts to build power systems quickly
LaTeXProfessional document preparation system and document markup language
LispUnique features - excellent to study programming constructs
LogoDialect of Lisp that features interactivity, modularity, extensibility
LuaDesigned as an embeddable scripting language
MarkdownPlain text formatting syntax designed to be easy-to-read and easy-to-write
Objective-CObject-oriented language that adds Smalltalk-style messaging to C
OCamlThe main implementation of the Caml language
PascalImperative and procedural language designed in the late 1960s
PerlHigh-level, general-purpose, interpreted, scripting, dynamic language
PHPPHP has been at the helm of the web for many years
PostScriptInterpreted, stack-based and Turing complete language
PrologA general purpose, declarative, logic programming language
PureScriptSmall strongly, statically typed language compiling to JavaScript
PythonGeneral-purpose, structured, powerful language
QMLHierarchical declarative language for user interface layout - JSON-like syntax
RDe facto standard among statisticians and data analysts
RacketGeneral-purpose, object-oriented, multi-paradigm, functional language
RakuMember of the Perl family of programming languages
RubyGeneral purpose, scripting, structured, flexible, fully object-oriented language
RustIdeal for systems, embedded, and other performance critical code
ScalaModern, object-functional, multi-paradigm, Java-based language
SchemeA general-purpose, functional language descended from Lisp and Algol
ScratchVisual programming language designed for 8-16 year-old children
SQLAccess and manipulate data held in a relational database management system
Standard MLGeneral-purpose functional language characterized as "Lisp with types"
SwiftPowerful and intuitive general-purpose programming language
TclDynamic language based on concepts of Lisp, C, and Unix shells
TeXMarkup and programming language - create professional quality typeset text
TypeScriptStrict syntactical superset of JavaScript adding optional static typing
ValaObject-oriented language, syntactically similar to C#
VHDLHardware description language used in electronic design automation
VimLPowerful scripting language of the Vim editor
XMLRules for defining semantic tags describing structure ad meaning
Subscribe
Notify of
guest

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

0 Comments
Inline Feedbacks
View all comments