Buy new:
-59% $16.20$16.20
FREE delivery Tuesday, December 16 on orders shipped by Amazon over $35
Ships from: Amazon Sold by: MatSamStore
Save with Used - Very Good
$6.48$6.48
FREE delivery December 18 - 22
Ships from: ThriftBooks-Phoenix Sold by: ThriftBooks-Phoenix
Sorry, there was a problem.
There was an error retrieving your Wish Lists. Please try again.Sorry, there was a problem.
List unavailable.
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.
Follow the author
OK
Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series) 1st Edition
Purchase options and add-ons
Through realistic examples, Slatkin uncovers little-known Python quirks, intricacies, and idioms that powerfully impact code behavior and performance. You'll learn how to choose the most efficient and effective way to accomplish key tasks when multiple options exist, and how to write code that's easier to understand, maintain, and improve.
Drawing on his deep understanding of Python's capabilities, Slatkin offers practical advice for each major area of development with both Python 3.x and Python 2.x. Coverage includes:
- Algorithms
- Objects
- Concurrency
- Collaboration
- Built-in modules
- Production techniques
- And more
- ISBN-109780134034287
- ISBN-13978-0134034287
- Edition1st
- PublisherAddison-Wesley Professional
- Publication dateFebruary 26, 2015
- LanguageEnglish
- Dimensions9 x 7 x 0.5 inches
- Print length256 pages
There is a newer edition of this item:
Frequently bought together

What do customers buy after viewing this item?
Lowest Price
in this set of productsThis item:
Effective Python: 59 Specific Ways to Write Better Python (Effective Software Development Series)PaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Tuesday, Dec 16Only 2 left in stock - order soon.Most purchased | Highest rated
in this set of products
Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to ProgrammingPaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Monday, Dec 15
Effective Python: 125 Specific Ways to Write Better Python (Effective Software Development Series)PaperbackFREE ShippingGet it Dec 22 - 30Only 5 left in stock - order soon.
Fluent Python: Clear, Concise, and Effective ProgrammingPaperbackFREE Shipping by AmazonGet it as soon as Monday, Dec 15
Customers also bought or read
- Fluent Python: Clear, Concise, and Effective Programming
Paperback$43.99$43.99FREE delivery Mon, Dec 15 - Python Pocket Reference: Python In Your Pocket (Pocket Reference (O'Reilly))
Paperback$13.09$13.09Delivery Mon, Dec 15 - Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming#1 Best SellerSoftware Development
Paperback$27.53$27.53Delivery Mon, Dec 15
From the Publisher
59 Specific Ways to Write Better Python
|
5+ Hours of Video Instruction
|
Definitive Reference Guide
|
Master the Powerful Python 3 Standard Library through Real Code Examples
|
8+ Hours of Video Instruction
|
|
|---|---|---|---|---|---|
|
Add to Cart
|
Add to Cart
|
Add to Cart
|
|||
| Customer Reviews |
4.6 out of 5 stars 379
|
— |
4.3 out of 5 stars 225
|
4.5 out of 5 stars 133
|
— |
| Price | $16.20$16.20 | — no data | $6.82$6.82 | $25.94$25.94 | — no data |
| Title | Effective Python | Effective Python LiveLessons | Python Essential Reference | The Python Standard Library by Example | Modern Python LiveLessons: Big Ideas and Little Code in Python |
| Author | Brett Slatkin | Brett Slatkin | David Beazley | Doug Hellmann | Raymond Hettinger |
| User Experience Level | Intermediate and advanced level Python programmers | Intermediate and advanced level Python programmers | Assumes that the reader has prior programming experience with Python or another language such as C or Java | Intermediate-level Python programmers | Intermediate-level Python programmers |
| What You Will Learn | How to harness Python’s full power to write exceptionally robust and well-performing code. | The Pythonic way of writing programs, building on a fundamental understanding of Python to help you write programs more effectively. | The core Python language, and the most essential parts of the Python library. | How to utilize the Python 3.x library to jump-start application development. | How to elegantly code powerful solutions succinctly and efficiently with Python. |
| Core Concept | Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Brett Slatkin brings together 59 Python best practices, tips, and shortcuts, and explains them with realistic code examples. | Hands-on demonstration of a broad but related set of items designed to provide concise and specific guidance on what to do and what to avoid when writing programs using Python. | Accurate and concise reference to the most important parts of Python. | Presents selected examples from the hundereds of modules in the Python standard linrary demonstrating how to use the most commonly used features of the modules that support Python’s 'batteries included' slogan. | Provides developers with an approach to programming in Python that expresses big ideas succinctly, with the minimum of code, allowing the business logic to shine through. |
| Key Topics Covered | Best practices for writing functions that clarify intention, promote reuse, and avoid bugs; Expressing behaviors with classes and objects; Avoid pitfalls with metaclasses and dynamic attributes; Efficient approaches to concurrency and parallelism; Techniques and idioms for using Python’s built-in modules; Tools and best practices for collaborative development | Methods; Comprehensions and generators; Functions and classes; Concurrency and parallelism; How to make programs more robust | Language features, libraries, and modules; Generators, coroutines, closures, metaclasses, and decorators; How to use Python 2.6’s forward compatibility mode to evaluate code for Python 3 compatibility; Low-level system and networking library modules | Python 3.x’s new libraries, significant functionality changes, and new layout and naming conventions. Expert porting guidance for moving code from 2.x Python standard library modules to their Python 3.x equivalents. | Newer features from Python 3.6, including f-strings and type hinting; ETL (extract-transform-load) techniques to prepare real-world data for analysis; How to improve code reliability |
| Python Versions Covered | 3.x and 2.x | Python 3 | Python 2.6 and 3.0. Omits features of Python 2 that have been removed from Python 3. Does not features of Python 3 that have not been back-ported. | Python 3 In an effort to maintain clear and concise descriptions for each example, the differences between Python 2 and 3 are not highlighted in each chapter. | Python 3.6 |
Editorial Reviews
Review
“I’ve been programming in Python for years and thought I knew it pretty well. Thanks to this treasure trove of tips and techniques, I realize there’s so much more I could be doing with my Python code to make it faster (e.g., using built-in data structures), easier to read (e.g., enforcing keyword-only arguments), and much more Pythonic (e.g., using zip to iterate over lists in parallel).”
–Pamela Fox, educationeer, Khan Academy
“If I had this book when I first switched from Java to Python, it would have saved me many months of repeated code rewrites, which happened each time I realized I was doing particular things ‘non-Pythonically.’ This book collects the vast majority of basic Python ‘must-knows’ into one place, eliminating the need to stumble upon them one-by-one over the course of months or years. The scope of the book is impressive, starting with the importance of PEP8 as well as that of major Python idioms, then reaching through function, method and class design, effective standard library use, quality API design, testing, and performance measurement–this book really has it all. A fantastic introduction to what it really means to be a Python programmer for both the novice and the experienced developer.”
–Mike Bayer, creator of SQLAlchemy
“Effective Python will take your Python skills to the next level with clear guidelines for improving Python code style and function.”
–Leah Culver, developer advocate, Dropbox
“This book is an exceptionally great resource for seasoned developers in other languages who are looking to quickly pick up Python and move beyond the basic language constructs into more Pythonic code. The organization of the book is clear, concise, and easy to digest, and each item and chapter can stand on its own as a meditation on a particular topic. The book covers the breadth of language constructs in pure Python without confusing the reader with the complexities of the broader Python ecosystem. For more seasoned developers the book provides in-depth examples of language constructs they may not have previously encountered, and provides examples of less commonly used language features. It is clear that the author is exceptionally facile with Python, and he uses his professional experience to alert the reader to common subtle bugs and common failure modes. Furthermore, the book does an excellent job of pointing out subtleties between Python 2.X and Python 3.X and could serve as a refresher course as one transitions between variants of Python.”
–Katherine Scott, software lead, Tempo Automation
“This is a great book for both novice and experienced programmers. The code examples and explanations are well thought out and explained concisely and thoroughly.”
–C. Titus Brown, associate professor, UC Davis
“This is an immensely useful resource for advanced Python usage and building cleaner, more maintainable software. Anyone looking to take their Python skills to the next level would benefit from putting the book’s advice into practice.”
–Wes McKinney, creator of pandas; author of Python for Data Analysis; and software engineer at Cloudera
About the Author
Product details
- ASIN : 0134034287
- Publisher : Addison-Wesley Professional
- Publication date : February 26, 2015
- Edition : 1st
- Language : English
- Print length : 256 pages
- ISBN-10 : 9780134034287
- ISBN-13 : 978-0134034287
- Item Weight : 1.06 pounds
- Dimensions : 9 x 7 x 0.5 inches
- Part of series : Effective Software Development
- Best Sellers Rank: #1,701,918 in Books (See Top 100 in Books)
- #1,297 in Computer Programming Languages
- #1,297 in Python Programming
- Customer Reviews:
About the author

Brett Slatkin is the author of the book Effective Python and has been writing Python code professionally for the past 20 years. He works as a principal software engineer in the Office of the CTO at Google developing technology strategies and rapid prototypes. His experience includes: founding Google Surveys, a platform for collecting machine learning and market research datasets; launching Google App Engine, the company's first cloud computing product; scaling Google's A/B experimentation products to billions of users; and co-creating PubSubHubbub, the W3C standard for real-time RSS feeds. He earned his B.S. in Computer Engineering from Columbia University in the City of New York.
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 provides clear explanations of valuable programming ideas, with well-written examples that are concise and easy to follow. The book is useful for both experienced and new Python developers, helping them write cleaner and more maintainable code. They appreciate its readability and find it well worth the investment.
AI Generated from the text of customer reviews
Customers find the book provides clear explanations of Python programming concepts and best practices, with one customer particularly appreciating the sections on list comprehension and generators.
"Well organized and useful information - even for an experience python programmer. I like a book that is concise...." Read more
"Not a book for the python beginner, but for those looking for great information which is to the point, get this book." Read more
"Great insight on how to take your Python skills to the next level." Read more
"...At the end of each section are excellent summaries of the key things to remember." Read more
Customers find the book easy to read and enjoyable, with one customer noting it's a must-read for Pythonistas.
"Great book, concise and well-organized. I'm new to python and this is the third book I've tried on learning the tricks." Read more
"Very good book...." Read more
"This is an awesome book! I highly recommend it!" Read more
"Possibly the best python book out there for someone with python experience that is looking to refine their skills." Read more
Customers find the book provides excellent guidance on Python best practices and is useful for both experienced developers and new coders.
"...They are very useful. I read the effective python, hope it can be useful as well. However, it doesn't meet my expectation...." Read more
"Helpful resource. Clear, well-written examples are given, but I would have preferred more topics..." Read more
"This books is good for beginners and does cover some basic concepts required to be known by a python developer" Read more
"Amazingly useful and relevant to improving your Python code if you already have a handle on the basics...." Read more
Customers appreciate the book's writing style, noting its well-written examples, concise format, and good formatting and layout.
"Straight to the point, concise and all organized. Helped to get me going in Python. Recommend it your age serious about Python." Read more
"...Great examples, nicely formatted, great pace. Love this book." Read more
"Love the format. Answers specific questions on best practices very quickly." Read more
"This book is clearly written and help me truly learn python beyond a basic level." Read more
Customers find the book's content clear, with helpful examples that are easy to follow.
"Good enough to improve your code with good examples. Useful for new coders looking for hints to improve their ccode." Read more
"Great book! Examples are clear, and to the point! I learned a lot and enjoyed reading it." Read more
"Great examples, perfect to improve from beginner to intermediate. Highly recommend." Read more
"...this book shows is how to improve your Python code in specific and clear ways...." Read more
Customers find the book easy to learn and read, with one customer noting it has a good range of difficulty levels.
"Helpful resource. Clear, well-written examples are given, but I would have preferred more topics..." Read more
"Quick read, a lot of tips and tricks to help you make tremendous progress with python. Really helps you write better code." Read more
"...Suggestions are easy to follow and easily implemented." Read more
"...The author provides plenty of simple examples to make it easier to learn...." Read more
Customers appreciate the code quality of the book, noting that it makes code cleaner and more maintainable, with one customer highlighting its concise examples.
"...I use it as a guide to write better, cleaner code at work and it's been wonderful so far...." Read more
"...Item 3 finally helped me understand how to use str, unicode, and decode." Read more
"...and you can skip around in no particular order and there are concise code examples to demonstrate the ideas contained in each tip...." Read more
"Good enough to improve your code with good examples. Useful for new coders looking for hints to improve their ccode." Read more
Customers have mixed opinions about the book's value for money.
"Absolutely worth the money." Read more
"This was a waste of money on the Kindle. Don’t even bother, move on. None of the code downloads with the book. Just skip this crap." Read more
"...what convinced me the time to upgrade to python3 would be worth investing for my codebase, for, among other things, collections.abc...." Read more
"Good book worth buying...." Read more
Reviews with images
This is the book to bring your Python skill to the next level
Top reviews from the United States
There was a problem filtering reviews. Please reload the page.
- Reviewed in the United States on April 22, 2016Format: PaperbackVerified PurchaseI thought I knew Python pretty well before reading this book, but I discovered I have a lot to learn. What this book shows is how to improve your Python code in specific and clear ways.
One aspect I appreciated was how the author shows a naive implementation of a common solution. This is often a solution most people would think of, and these naive solutions looked correct at first glance. The author then shows where the naive solution fails, why it fails, and a way to do it better.
I particularly liked Item 37 which discussed threads in Python. It describes the CPython implementation and the GIL (global interpreter lock) in a way I have not seen before. It was a clear description and informative.
The chapters have a good range in difficulty from easy to challenging. For example, Item 2 is a recommendation to use PEP 8 as a style guide. This chapter will be easily accessible to anyone. However, Chapter 4 about Metaclasses and Attributes was extremely challenging for me.
Each sentence is well written and packed with information. Side notes are provided when needed and these were also useful. The coloring of the book is nice, as it looks like an interactive development environment to show which keywords are highlighted. The examples provided in the Items are relevant to current programming practices.
- Reviewed in the United States on April 7, 2015Format: PaperbackVerified PurchaseVery good book. Starts with basics, but it quickly goes into 'magic' territory, so whether you're a veteran or just wanting to see what's special about Python, you will find some new approaches.
The examples are clear. They are not some 'dry' Class X, method Y sort of examples, they tend to use examples that better illustrate the scenario; so if you at first don't get the author's explanation, you might see what's going on because of the connotations that come with sensible examples.
The formatting and layout are fairly good, especially with syntax highlighting code. There are few goofy spots where text talks about code that's displayed on the next page, so to relate one to the other you need to flip pages back'n'forth, and some tables/boxes spill over to the next page for like two lines. But that's just minor nit-picking.
My biggest 'complaint' is about what's NOT in the book. There is only a slight mention of itertools, or any functional programming concepts, that are so neatly baked into Python. There is also very slim amount of information on testing, which I would like to read more about, as it's become very commonplace. I would love to see a second edition of this book with extended sections on the aforementioned topics.
- Reviewed in the United States on April 9, 2023Format: KindleVerified PurchaseStraight to the point, concise and all organized. Helped to get me going in Python. Recommend it your age serious about Python.
- Reviewed in the United States on July 12, 2021Format: PaperbackVerified PurchaseAs a data scientist who has years' of experience of writing python code, I still learned quite a lot from this short but insightful book. The author teaches me a coding style that no other books can teach. If you are a regular python user, this book is a must-have and should be used frequently as your reference in your work.
- Reviewed in the United States on March 12, 2015Format: KindleVerified PurchaseGuess I'm the first person to purchase this book ( kindle edition ) on Amazon. I bought this book because of Fred Jonsson's great review.
I'll give book 5 stars for now and change it later if my experience warrants otherwise.
2015.03.20 : Update
What I have read I thoroughly enjoyed.
I'm not as gifted nor eloquent as Fred Jonsson. Fred did a superb job summarizing and describing the book and all I can add to that is I agree with everything he has said thus far.
I opted for kindle version because it was available now and I like portability, access anywhere on any device and ability to search.
It's very easy to read, follow along and information is immediately practical, beneficial and useful.
What one gains or experience is highly subjective and personal.
I like book. I'm learning. It's exceeding my expectations thus far. Highly recommend it.
If you haven't already done so, read Fred Jonsson's review and the Book's Description on main page. Based on what I've read in book thus far, everything they've shared is accurate.
- Reviewed in the United States on March 4, 2019Format: KindleVerified PurchaseAlthough I'm only about half way through the book I've already learned a lot of really cool tricks that I've actually applied in my own programs since. (I hate learning tricks that aren't that useful in practical use cases) So far, I especially enjoyed the sections about list comprehension and generators. Generators were completely new to me and I was amazed at how useful they are for large data sets!
There's lots of cool tricks to learn. The chapters are short enough where you can just sit down for 15 minutes and knock one out. This is great for me when I just want to read a little before bed, but I've also sat down and read the book for a few hours at a time. I've had no problems with the Kindle version. Although you can skip around in the book, I recommend a front to back read, as some of the concepts build on each other.
- Reviewed in the United States on November 23, 2015Format: KindleVerified Purchaseexcellent summary of some python features that make the language different than many others. Definitely a good read if you're looking to become a better python programmer or to understand a little more about some unique features (e.g metaclasses, decorators). I wish it had given a little more credit to or mention some 3P libraries if nothing else as a pointer to tell the reader what to read about next (e.g. requests, boto, pytest, matplotlib) just to mention a few areas.
Top reviews from other countries
AlessandroReviewed in Italy on August 8, 20153.0 out of 5 stars strange..
Format: PaperbackVerified Purchasethe book covers cases ranging from the most simple banality ( devote four pages to slicing seems ridiculous to me) to something mor complex . As Italian I found it poorly written: the phrasing long and too short code comments made me think of a text written by an Italian, like me :-)
For the rest : Many cases are simple style tips , some useful , some not .
I learned something , as usual , but it is'nt the book I would recommend to keep near the bed , except to sleep. I do not know if it really value his money .
-
るろうにプログラマReviewed in Japan on May 15, 20155.0 out of 5 stars Pythonで今まで見た中で一番いい本
Format: KindleVerified Purchase日本にはもともと Python に関する書籍が少ない気がしますが、洋書だといいものがありますね。
Effective シリーズということもあり、期待していましたが、予想通りいい本でした。
本書は Python を包括的に、より良い書き方を効率的に学習しようとする読者向けです。
必要な事前知識は基本的なシンタックスくらいです。(変数 式 型 関数 クラス)
1. 扱っているポイントが想像以上に良く、包括的
2. サンプルコード がいい "なぜ"に着眼点されているので、無味乾燥な感じが全くない
3. 英語自体そもそも読みやすい 使っている英単語、書き方が非常に平易
4. 欲を言えば class decorator の話もあればよかった( metaclass でほとんど話は終わっているが)
-
MaxReviewed in Germany on July 16, 20195.0 out of 5 stars Der Titel hält was er verspricht!
Format: PaperbackVerified PurchaseEffective Python! Ein sehr informatives Buch, auf relativ wenig Seiten. Ich bin außerordentlich zufrieden damit. Als nicht Profi, aber auch nicht Amateur war das Buch einleuchtend für mich. Ich hab viele Fehler erkannt die ich selber gemacht habe, aber dank den bespielen und Erklärungen kann man sich an die 'Pythonic ways' schnell anpassen! Ich hab das Buch immer noch nicht komplett durch aber meiner Meinung nach war es jeden Cent und noch mehr Wert!
Pradeep KumarReviewed in India on September 23, 20175.0 out of 5 stars Great book
Finally finished this book, It is an awesome, every item provided is a nugget, some of them are easy, some of them are very interesting and some of them are very hard. The book has it all, Must read for everyone who love python.
Susan StepneyReviewed in the United Kingdom on January 1, 20195.0 out of 5 stars This excellent little book will make you a better Python programmer in many ways
Format: PaperbackVerified PurchaseThis excellent little book will make you a better Python programmer in many ways. It comprises 59 different recipes of how to use Python more effectively. These range from programming in the small – such as using slicing, list comprehensions, generators, enumerate, zip – to progressively larger issues – such as exceptions, keyword arguments, custom containers – then on to trickier concepts – such as metaclasses, threads, coroutines, built-in modules – to programming in the large – such as reliable pickling, docstrings, packages, unit testing, profiling, and finding memory leaks.
Each one of the recipes explains the issue, discusses one or more solutions, with examples and discussion of tradeoffs, and concludes with a short list of the things to remember. The discussion of various tradeoffs gives great insight into the underlying issues, and the examples are well chosen and very useful.
Even if you follow only a few of the recipes, you will find they make your Python coding more effective. If you follow all 59, your code should fairly fly! Highly recommended.





![Computer Networking Bible: [3 in 1] The Complete Crash Course to Effectively Design, Implement and Manage Networks. Including Sections on Security, Performance and Scalability](/api/flow.js?q=https%3A%2F%2Fm.media-amazon.com%2Fimages%2FI%2F41H4YJnxKgL._AC_SR100%2C100_QL65_.jpg)



