Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Portable, powerful, and a breeze to use, Python is ideal for both standalone programs and scripting applications. With this hands-on book, you can master the fundamentals of the core Python language quickly and efficiently, whether you're new to programming or just new to Python. Once you finish, you will know enough about the language to use it in any application domain you choose. Learning Python is based on material from author Mark Lutz's popular training courses, which he's taught over the past decade. Each chapter is a self-contained lesson that helps you thoroughly understand a key component of Python before you continue. Along with plenty of annotated examples, illustrations, and chapter summaries, every chapter also contains Brain Builder, a unique section with practical exercises and review quizzes that let you practice new skills and test your understanding as you go. This book covers:

  • Types and Operations -- Python's major built-in object types in depth: numbers, lists, dictionaries, and more

  • Statements and Syntax -- the code you type to create and process objects in Python, along with Python's general syntax model

  • Functions -- Python's basic procedural tool for structuring and reusing code

  • Modules -- packages of statements, functions, and other tools organized into larger components

  • Classes and OOP -- Python's optional object-oriented programming tool for structuring code for customization and reuse

  • Exceptions and Tools -- exception handling model and statements, plus a look at development tools for writing larger programs

Learning Python gives you a deep and complete understanding of the language that will help you comprehend any application-level examples of Python that you later encounter. If you're ready to discover what Google and YouTube see in Python, this book is the best way to get started.

Subscriber Reviews

Average Rating: 3.3333333333333335 out of 5 rating Based on 3 Ratings

"Decent book" - by Anonymous on 16-JAN-2010
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
The book gives a good rundown of Python features, which filled most of my requirements. It totally ignores embedding Python in C/C++/... programs delegating this to other publications which is regrettable.
However, it seems like this book is written by someone who's not a developer but an instructor who studied the language. The examples are too simplistic with almost no self documentation which no self respecting developer would code.
So here's the dilemma - an experienced developer should just browse through the book to extract Python's syntax and basic architecture/philosophy (about 2 pages per chapter should do). But for such a developer this book is way too long and involved. Yet I wouldn't recommend the book for a beginner, as it doesn't instill the proficiencies a developer should have. At times the author drops hints which are downright silly - like private and protected attributes in classes being unnecessary. Agreed, you can do without, but why the hell would you want to?
Also it's annoying to see that all paths referenced are in Windoze. :-)

Report as Inappropriate

Table of Contents



The publisher has provided additional content related to this title.


Visit the catalog page for Learning Python, 3rd Edition

  • Catalog Page

Visit the errata page for Learning Python, 3rd Edition

  • Errata

Download the supplemental electronic content for Learning Python, 3rd Edition

  • Supplemental Content