
Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows with Prime
Try Prime
and start saving today with fast, free delivery
Amazon Prime includes:
Fast, FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with Fast, FREE Delivery" below the Add to Cart button.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited Free Two-Day Delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
- Unlimited photo storage with anywhere access
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Buy new:
$74.99$74.99
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$29.68$29.68
Ships from: Amazon Sold by: WorthWhile Reads

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Learning Python: Powerful Object-Oriented Programming 5th Edition
Purchase options and add-ons
Get a comprehensive, in-depth introduction to the core Python language with this hands-on book. Based on author Mark Lutz’s popular training course, this updated fifth edition will help you quickly write efficient, high-quality code with Python. It’s an ideal way to begin, whether you’re new to programming or a professional developer versed in other languages.
Complete with quizzes, exercises, and helpful illustrations, this easy-to-follow, self-paced tutorial gets you started with both Python 2.7 and 3.3― the latest releases in the 3.X and 2.X lines―plus all other releases in common use today. You’ll also learn some advanced language features that recently have become more common in Python code.
- Explore Python’s major built-in object types such as numbers, lists, and dictionaries
- Create and process objects with Python statements, and learn Python’s general syntax model
- Use functions to avoid code redundancy and package code for reuse
- Organize statements, functions, and other tools into larger components with modules
- Dive into classes: Python’s object-oriented programming tool for structuring code
- Write large programs with Python’s exception-handling model and development tools
- Learn advanced Python tools, including decorators, descriptors, metaclasses, and Unicode processing
- ISBN-101449355730
- ISBN-13978-1449355739
- Edition5th
- PublisherO'Reilly Media
- Publication dateJuly 30, 2013
- LanguageEnglish
- Dimensions7 x 2.8 x 9.19 inches
- Print length1643 pages
There is a newer edition of this item:
Frequently bought together

Customers who viewed this item also viewed
From the brand

-
Learn Python
-
Python performace
-
Python for Data Science
-
Sharing the knowledge of experts
O'Reilly's mission is to change the world by sharing the knowledge of innovators. For over 40 years, we've inspired companies and individuals to do new things (and do them better) by providing the skills and understanding that are necessary for success.
Our customers are hungry to build the innovations that propel the world forward. And we help them do just that.
Editorial Reviews
About the Author
Mark is the author of the three O'Reilly books: Learning Python, Programming Python, and Python Pocket Reference, all currently in fourth or fifth editions. He has been using and promoting Python since 1992, started writing Python books in 1995, and began teaching Python classes in 1997. As of Spring 2013, Mark has instructed 260 Python training sessions, taught roughly 4,000 students in live classes, and written Python books that have sold 400,000 units and been translated to at least a dozen languages
Together, his two decades of Python efforts have helped to establish it as one of the most widely used programming languages in the world today. In addition, Mark has been in the software field for 30 years. He holds BS and MS degrees in computer science from the University of Wisconsin where he explored implementations of the Prolog language, and over his career has worked as a professional software developer on compilers, programming tools, scripting applications, and assorted client/server systems.
Mark maintains a training website (http://learning-python.com) and an additional book support site on the Web (http://www.rmi.net/~lutz).
Product details
- Publisher : O'Reilly Media
- Publication date : July 30, 2013
- Edition : 5th
- Language : English
- Print length : 1643 pages
- ISBN-10 : 1449355730
- ISBN-13 : 978-1449355739
- Item Weight : 5.35 pounds
- Dimensions : 7 x 2.8 x 9.19 inches
- Part of series : Learning Python
- Best Sellers Rank: #102,300 in Books (See Top 100 in Books)
- #30 in Object-Oriented Design
- #54 in Introductory & Beginning Programming
- #73 in Python Programming
- Customer Reviews:
About the author

Mark Lutz is the author of Python's classic and foundational texts, a former trainer with two decades of experience teaching Python to newcomers, and one of the people responsible for the prominence that Python enjoys today. For more info, see the author's books and programming site at learning-python.com.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find this Python book comprehensive and well-written, with one noting it goes through the language in excruciating detail. The book receives mixed feedback regarding its readability, with some finding it very readable while others say it's almost unreadable. Customers disagree on the book's length, with some appreciating its size while others find it overly long for its content. The organization and pacing also receive mixed reviews, with some finding it well-organized while others describe it as terrible, and some find it slow going while others note it's not a quick read.
AI-generated from the text of customer reviews
Select to learn more
Customers find the book comprehensive and detailed, serving as a massive guide to Python with thorough explanations, though some note it is written for proficient developers rather than beginners.
"...He teaches everything so simple and easy to read. Go through his lines of every example and try to understand what is happening...." Read more
"...But so far, I am impressed on the thoroughness of the subject matter. The main grip I have is that I bought the kindle version...." Read more
"This is an excellent book for intermediate to advanced programmers looking for a methodical deep dive into the Python programming language...." Read more
"This is a great, thorough, quality book on Python, targeted at individuals who have some experience writing programs, but who want to learn Python..." Read more
Customers find the book great and useful, with one mentioning it's worth diving into and following every lesson.
"...Then I bought this book. and WOW. This book was absolutely amazing. I read it for hours everyday from when I purchased it...." Read more
"...Good book, don’t be put off by author's python sales pitch, just think AI, machine learning, access to latest AI stuff using Google Tensorflow..." Read more
"This is a great, thorough, quality book on Python, targeted at individuals who have some experience writing programs, but who want to learn Python..." Read more
"...done a masterful job of thoroughly covering Python, and it's an impressive work...." Read more
Customers have mixed opinions about the book's readability, with some finding it very readable and well-written, while others describe it as almost unreadable.
"...It’s taught in a simple easy to understand way. And the appendix is well laid out so after you finish reading it and get into the nitty gritty of..." Read more
"...I had a hard time understanding the nuances of the language. I spent hours searching online and watching tutorial videos...." Read more
"...Mark has such a Fantastic Grasp on the Python Language that he uses his skill to Be Your Guide on Your Journey to Learning and Understanding How to..." Read more
"...Scripting languages are not easy to learn (in my opinion), hence the need for this large book...." Read more
Customers have mixed opinions about the book's length, with some appreciating that the size is not intimidating, while others find it overly long for what it contains.
"...get started and up and running you’re probably going to find this book overly long and far too “in the weeds” to be useful...." Read more
"...The contents are expansive and in depth without overloading you. It’s taught in a simple easy to understand way...." Read more
"...Of course, that's probably why the book is over 1500 pages long...." Read more
"...hence need for large book, and at 1600 pages this is largest book, and well written." Read more
Customers have mixed opinions about the book's organization, with some finding it well structured while others describe it as terrible.
"...Further, the section on loops is also poorly organized and filled with fluff. I could go on but i think my frustration is evident...." Read more
"...You start seeing how programs are put together, how every single line has a purpose. The syntax, the wording, the placement , the white space...." Read more
"...It's really not organized and as a person with coding experience, this book could definitely confuse a beginner trying to learn a language that is..." Read more
"...The approach, level of detail and structure/organisation of the book suits my learning style...." Read more
Customers have mixed opinions about the book's pacing, with several noting it is slow going and not a quick read.
"...But subscribers like me are frustrated by the slowness and poor user interface. Publisher needs to decide what's the target readers...." Read more
"...me try to explain why this 1600 page book may actually end up saving you a lot of time and making you a better Python programmer in the end...." Read more
"...This book, by contrast, does not get you started quickly. It is nearly 1600 pages long...." Read more
"This is a huge book. It's slow going because I only work through a few pages at a time...." Read more
Reviews with images

A Mark Lutz Trifecta of Python Winners
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on April 5, 2023I wanted to pick up programming as a little hobby to do in my spare time. After stumbling through countless websites picking up little tidbits of information here and there (and spending ALOT more time and effort than I expected) I was starting to doubt if this was even possible to learn myself. As said before, I would pick up little bits of information and try to make my own little programs. I got very very basic information down but couldn’t comprehend how to to write anything more than a simple 20 line script. I was about to give up. Then I bought this book.
and WOW. This book was absolutely amazing. I read it for hours everyday from when I purchased it. I finished the book 3 weeks later. I can say this book was monumental in what it taught me. (And it’s size too - LOL - the thing is massive but so worth the read)
He teaches everything so simple and easy to read. Go through his lines of every example and try to understand what is happening. You’ll find by about page 500 everything is slowly starting to make sense. By page 1000 you’ll be thinking wow I can read and understand each example of code (even the longer ones). You start seeing how programs are put together, how every single line has a purpose. The syntax, the wording, the placement , the white space. I’ve thoroughly enjoyed learning programming from this book. It has enabled me to complete an online python course. I love solving problems on my own - each one is like a puzzle and I get a little joy when I successfully complete the challenge. Thank you Mark - for allowing me to experience this journey. I surely would have given up had I not found this book.
This book is like sitting directly in his college lectures for a semester. Only I didn’t have to spend 4 months to get the information. I could learn as fast as I could read. All told it was a 3 week book for me and it was very very very worth it. I’ve purchased his second book (Programming Python) and hope it will be just as good as this one.
If you’re serious about learning python than stop looking further. This needs to be a book you buy.
The contents are expansive and in depth without overloading you. It’s taught in a simple easy to understand way. And the appendix is well laid out so after you finish reading it and get into the nitty gritty of programming you can always know exactly where to look in the book to get help on how to do something. A+++.
Again, thank you Mark.
- Reviewed in the United States on January 14, 2014I don't write too many reviews but I have to review this book. I'm just trying to learn the language to do some web, security, and rasberry pi development on my own. I tried to learn python over a year ago, got frustrated and quit. I tried to pick up the language again about 2 weeks ago. I have read and tried to work through Learning Python the Hard Way (LPHW). LPHW is a good resource and it did give me a general understand of the language. It teaches python version 2x. I have also read Dive into Python 3 (DP3). DP3 is also a good resource and it teaches python version 3x. I have also read and referenced [...] For the most part, I am able to write simple code. But I got frustrated when I tried to review and understand complex code structures. I had a hard time understanding the nuances of the language. I spent hours searching online and watching tutorial videos. But I was constantly frustrated because there were all these exceptions that didn't make sense to me. I kept on asking why this works and why that does not work.
The best thing about this book is that it explain the nuances of the language by giving multiple examples. So it does explains it in a complete manner. A lot of other resources will touch upon a topic and then glance over it. I often wondered.. what about this... so a lot of other resources expect you to test the other cases out which in most circumstance will be okay, but in others, you are still left wondering "why?". This book does not do that. In fact, I almost didn't need to try the examples on the interactive python command line because it was so thorough.
This book is not for the beginner. You will get lost among the trees in the forest because there is so much information in this book. If you are impatient or need to start coding right away, you really won't be able to do this with Learning Python. LPHW and DP3 are much better at getting you up and running. But to write error free code, you have to understand the nuances of the language which Learning Python teaches you. Learning Python the Hard Way (free on the internet) and Dive into Python 3 (also free) are great resources to get introduced to the language. I would recommend both before you delve into this book. But once you get an understand of the basics of python, this book will fill in the missing details.
As a disclaimer, I have only been reading this book for a day. I have already read 300 pages. A lot of it was review. But I learned a lot of new stuff as well that filled in the gaps. I have not read the section on regex or the more advanced sections yet so this review is not complete. But so far, I am impressed on the thoroughness of the subject matter.
The main grip I have is that I bought the kindle version. If I read it in a linear fashion the material seem to flow nicely. But when I come to certain sections, I need to jump around. You find this a lot with any technical book. The kindle version makes this difficult because I cannot "easily" keep track of what I was reading so I get side tracked a lot. I also cannot effectively add notes (yes, I know I can add notes). I ended up using 4 devices to read this book just to keep track of where I was. I may get the hardcopy so that I have an easy quick reference book to look at later at my desk. With a hard copy, I use bookmarkers that I can quickly page to. I know about the kindle bookmarks but they are cumbersome to use. Fortunately, its hard to beat the fact that I can carry this book on my phone if I wanted to. So I would rate the kindle version 3 stars.
Overall, I would buy this again on kindle.
Top reviews from other countries
-
Dr. T.Reviewed in Germany on February 18, 2019
5.0 out of 5 stars Python – DAS Kompendium
Das vorliegende Buch ist ein umfassendes Kompendium der Programmiersprache Python, in aller Ausführlichkeit werden seine Syntax, fundamentalen Konstrukte, Design Ideen und Struktur Paradigmen im Zusammenhang und in aller gebotenen Tiefe erörtert – 'Learning Phython' konzentriert sich dabei bewusst auf die core language.
Python ist eine extrem einfache Sprache, die schon optisch durch ihre Klammer-lose Block- Strukturen aus der Menge hervor sticht, Variablen müssen nicht umständlich typisiert werden und haben in der Regel schon den richtigen Scope, andererseits lassen sich aus Arrays und assoziativen Arrays (Dictionaries) ad hoc komplexe Strukturen bilden, schließlich kennt Python mächtige objektorientierte Konstruktion, die mit minimalen syntaktischen Aufwand verwende werden können. Sämtliche dieser Design Entscheidungen sind auf Einfachheit und Effektivität ausgerichtet, sicher auch ein Grund, weswegen Python in den letzten Jahren vielfältige Anwendungen in den Bereichen Künstliche Intelligenz und Maschinellen Lernen fand.
Das Buch ist systematisch als Tutorial aufgebaut, natürlicherweise beginnt die Darstellung bei den elementare Builtin Typen, konditionalen Verzweigungen, Loops und Iteratoren, gefolgt von Listen, Tuples, Dictionaries und Files. Klassen sind das Grundkonstrukt, wenn es um die Bündelung von beliebigen Attributen, d.h. sowohl Feldern als auch Funktionen, resp. Methoden, geht; das Klassenmodel von Python ist sehr flexible und erlaubt Mehrfachvererbung und die Überladung von Operatoren. Ein wesentlicher 'Trick' von Python ist aber die Offenlegung von 'magischen' (managed) Attributen, mit ihrer Hilfe können so ziemlich alle Aspekte von Funktionen und Aspekte a posteriori beeinflusst werden. Sie sind das Geheimnis hinter solchen fortgeschritteneren Konstrukten wie Decorators und Properties, selbstverständlich ist auch die Instanziierung von Klassen kontrollierbar – mittels sogenannter Metaklassen. Es gehört sicher zu besonderen Reiz von Python, dass diese elaborierten Paradigmen dank der Offenheit dieser 'magic elements' leicht verständlich und nachvollziehbar bleiben.
Bei all den Details, die das Buch von Python offenbart, ist es kein Referenz Manual und will das auch nicht sein, wie der Autor im Vorwort bekennt, eben sowenig ist es ein Guide zum 'Bauen' von Anwendungen aus 'bewerten' Code Schnipseln. Sicher wird der Leser, den größten Gewinn aus dem vorliegenden Buch ziehen, der eine saubere Diskussion von Grundlagen erwarten, der aber vor allem die Dinge in ihrem Zusammenspiel verstehen möchte. Dieses Kompendium ist dank seines soliden Stiles auch für erfahrene Programmierer eine unschätzbare Fundgrube und Lesegenus. Es gehört zweifellos zu jenen Standardwerken, die ganze Regal- Meter von 'easy intro...' oder '… in xx days' überflüssig werden lassen – und es gehört damit ebenbürtig in die Reihe von Werken wie Kernighan 'The C Programming Language' oder Stevens 'TCP/IP'.
Das Werk ist auch ein Beweis für die Stabilität der O' Reily Paperback Buchbindung, die die fast 1600 Seiten sicher hält; das “Hand“-buch, mit seinen stattlichen 3kg, sollte aber längere Zeit nur mit einer festen Unterlage benutzt werden.
-
beetrootReviewed in France on September 8, 2020
5.0 out of 5 stars Livraison excellente, collection de timbres :)
La livraison s'est faite relativement vite. Le vendeur est sérieux et soigné. L'emballage est soigné avec du papier à bulles.
Anecdote: Je n'ai jamais vu autant de timbre sur un colis de la poste ^^ ! C'est impressionnant ! En plus ce sont de beaux timbres assez peu fréquents, à tel point que j'ai gardé l'emballage :)
Merci J-L.
- AleksanderReviewed in Poland on May 20, 2021
3.0 out of 5 stars Content is great, delivery and paper not
The content of the book is very detailed and I personally found it useful during the learning process. The book came in not so good physical shape. The reason is partly paper quality, mostly though, it concerns packaging which allows the book to move freely inside the box.
- nazarenoReviewed in the United Kingdom on September 22, 2017
5.0 out of 5 stars Buy it, have it on your desk, enjoy it, re-read it.
I like the book, enjoying it a lot, right about chapter 9 or so; although it is dense and it needs time to digest.
Pros:
- Very in-depth for 2.x and 3.x, really like how the author tackles subjects.
- Clear examples and goes in depth in all of them.
- So full of information that I feel I learn more than expected.
- Excellent as a reference as well.
- Excellent to learn how things really work in python, not a tutorial, not a simple guy, an in-depth killer book.
- Good set of quiz questions and also exercises.
- Good value for money.
Cons:
- Can be slightly dense.
- Some things are not extremely necessary and going too in-depth can cause the reader to think "when are we writing some code? c'mon".
Buy it, have it on your desk.
nazarenoBuy it, have it on your desk, enjoy it, re-read it.
Reviewed in the United Kingdom on September 22, 2017
Pros:
- Very in-depth for 2.x and 3.x, really like how the author tackles subjects.
- Clear examples and goes in depth in all of them.
- So full of information that I feel I learn more than expected.
- Excellent as a reference as well.
- Excellent to learn how things really work in python, not a tutorial, not a simple guy, an in-depth killer book.
- Good set of quiz questions and also exercises.
- Good value for money.
Cons:
- Can be slightly dense.
- Some things are not extremely necessary and going too in-depth can cause the reader to think "when are we writing some code? c'mon".
Buy it, have it on your desk.
Images in this review
One person found this helpfulReport - francescoReviewed in the Netherlands on February 3, 2022
2.0 out of 5 stars Verbose, cluttered and dispersive
Unnecessarily long, extremely dispersive and cluttered. Sometimes redundant and ripetitive, sometimes surprisingly dismissive.
Check David Beazley books instead.