Buy New
-10%
$63.02$63.02
FREE delivery July 15 - 21
Ships from: Happy Trade Store Sold by: Happy Trade Store
Get it faster
$73.25$73.25
FREE delivery Tuesday, July 14
Ships from: Amazon Sold by: Happy Trade Store
Used - Very Good
$14.15$14.15
FREE delivery July 17 - 23
Ships from: 2nd Life Books Sold by: 2nd Life Books
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: 90 Specific Ways to Write Better Python (Effective Software Development Series)
Purchase options and add-ons
Updated and Expanded for Python 3
It’s easy to start developing programs with Python, which is why the language is so popular. However, Python’s unique strengths, charms, and expressiveness can be hard to grasp, and there are hidden pitfalls that can easily trip you up.
This second edition of Effective Python will help you master a truly “Pythonic” approach to programming, harnessing Python’s full power to write exceptionally robust and well-performing code. Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Brett Slatkin brings together 90 Python best practices, tips, and shortcuts, and explains them with realistic code examples so that you can embrace Python with confidence.
Drawing on years of experience building Python infrastructure at Google, Slatkin uncovers little-known quirks and idioms that powerfully impact code behavior and performance. You’ll understand the best way to accomplish key tasks so you can write code that’s easier to understand, maintain, and improve. In addition to even more advice, this new edition substantially revises all items from the first edition to reflect how best practices have evolved.
Key features include
- 30 new actionable guidelines for all major areas of Python
- Detailed explanations and examples of statements, expressions, and built-in types
- Best practices for writing functions that clarify intention, promote reuse, and avoid bugs
- Better techniques and idioms for using comprehensions and generator functions
- Coverage of how to accurately express behaviors with classes and interfaces
- Guidance on how to avoid pitfalls with metaclasses and dynamic attributes
- More efficient and clear approaches to concurrency and parallelism
- Solutions for optimizing and hardening to maximize performance and quality
- Techniques and built-in modules that aid in debugging and testing
- Tools and best practices for collaborative development
Effective Python will prepare growing programmers to make a big impact using Python.
- ISBN-100134853989
- ISBN-13978-0134853987
- Edition2nd
- PublisherAddison-Wesley Professional
- Publication dateNovember 15, 2019
- LanguageEnglish
- Dimensions7 x 0.9 x 9 inches
- Print length480 pages
There is a newer edition of this item:
![]() |
Frequently bought together

Customers who viewed this item also viewed
- Effective Python: 125 Specific Ways to Write Better Python (Effective Software Development Series)PaperbackFREE Shipping by AmazonGet it as soon as Monday, Jul 13
- Fluent Python: Clear, Concise, and Effective ProgrammingPaperbackFREE Shipping by AmazonGet it as soon as Monday, Jul 13
- 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, Jul 13
- Automate the Boring Stuff with Python, 3rd EditionPaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Monday, Jul 13
- Learning Python: Powerful Object-Oriented ProgrammingPaperbackFREE Shipping by AmazonGet it as soon as Monday, Jul 13
Customers also bought or read
- Fluent Python: Clear, Concise, and Effective Programming
Paperback$43.99$43.99FREE delivery Mon, Jul 13 - Python Crash Course, 3rd Edition: A Hands-On, Project-Based Introduction to Programming#1 Best SellerFunctional Software Programming
Paperback$23.96$23.96Delivery Mon, Jul 13 - Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter
Paperback$43.99$43.99FREE delivery Jul 20 - 26 - Architecture Patterns with Python: Enabling Test-Driven Development, Domain-Driven Design, and Event-Driven Microservices
Paperback$37.10$37.10FREE delivery Mon, Jul 13 - The Pragmatic Programmer: Your Journey To Mastery, 20th Anniversary Edition (2nd Edition)#1 Best SellerSoftware Testing
Hardcover$45.97$45.97FREE delivery Mon, Jul 13 - Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems
Paperback$49.50$49.50FREE delivery Mon, Jul 13 - Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total Beginners
Paperback$22.00$22.00Delivery Jul 15 - 18 - Operating Systems: Three Easy Pieces#1 Best SellerComputer Operating Systems Theory
Paperback$28.27$28.27Delivery Mon, Jul 13 - Designing Machine Learning Systems: An Iterative Process for Production-Ready Applications
Paperback$40.00$40.00FREE delivery Mon, Jul 13 - Design Patterns: Elements of Reusable Object-Oriented Software
Hardcover$23.43$23.43Delivery Tue, Jul 14 - Deep Learning (Adaptive Computation and Machine Learning series)
Hardcover$61.00$61.00FREE delivery Mon, Jul 13 - Clean Architecture: A Craftsman's Guide to Software Structure and Design (Robert C. Martin Series)
Paperback$30.29$30.29Delivery Mon, Jul 13 - Python 3: The Comprehensive Guide to Hands-On Python Programming (Rheinwerk Computing)
Paperback$48.16$48.16FREE delivery Mon, Jul 13 - Tour of C++, A (C++ In-Depth Series)#1 Best SellerC++ Programming Language
Paperback$35.19$35.19FREE delivery Mon, Jul 13 - Hands-On Large Language Models: Language Understanding and Generation
Paperback$47.69$47.69FREE delivery Mon, Jul 13 - SQL Performance Explained Everything Developers Need to Know about SQL Performance
Paperback$49.99$49.99FREE delivery Mon, Jul 13 - Grokking Algorithms, Second Edition: An illustrated guide for programmers and other curious people
Paperback$43.99$43.99FREE delivery Mon, Jul 13 - Flask Web Development: Developing Web Applications with Python
Paperback$45.16$45.16FREE delivery Mon, Jul 13 - Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14
Paperback$44.83$44.83$3.99 delivery Jul 23 - 28
From the Publisher
Read this book if you want to write
exceptionally robust and well-performing code
code that’s easier to understand, maintain, and improve
functions that clarify intention, promote reuse, and avoid bugs
Editorial Reviews
Review
“I have been recommending this book enthusiastically since the first edition appeared in 2015. This new edition, updated and expanded for Python 3, is a treasure trove of practical Python programming wisdom that can benefit programmers of all experience levels.”
–Wes McKinney, Creator of Python Pandas project, Director of Ursa Labs
“If you’re coming from another language, this is your definitive guide to taking full advantage of the unique features Python has to offer. I’ve been working with Python for nearly twenty years and I still learned a bunch of useful tricks, especially around newer features introduced by Python 3. Effective Python is crammed with actionable advice, and really helps define what our community means when they talk about Pythonic code.”
–Simon Willison, Co-creator of Django
“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’ve discovered many ways to improve my Python code to make it faster (e.g., using bisect to search sorted lists), easier to read (e.g., enforcing keyword-only arguments), less prone to error (e.g., unpacking with starred expressions), and more Pythonic (e.g., using zip to iterate over lists in parallel). Plus, the second edition is a great way to quickly get up to speed on Python 3 features, such as the walrus operator, f-strings, and the typing module.”
–Pamela Fox, Creator of Khan Academy programming courses
“Now that Python 3 has finally become the standard version of Python, it’s already gone through eight minor releases and a lot of new features have been added throughout. Brett Slatkin returns with a second edition of Effective Python with a huge new list of Python idioms and straightforward recommendations, catching up with everything that’s introduced in version 3 all the way through 3.8 that we’ll all want to use as we finally leave Python 2 behind. Early sections lay out an enormous list of tips regarding new Python 3 syntaxes and concepts like string and byte objects, f-strings, assignment expressions (and their special nickname you might not know), and catch-all unpacking of tuples. Later sections take on bigger subjects, all of which are packed with things I either didn’t know or which I’m always trying to teach to others, including ‘Metaclasses and Attributes’ (good advice includes ‘Prefer Class Decorators over Metaclasses’ and also introduces a new magic method ‘__init_subclass__()’ I wasn’t familiar with), ‘Concurrency’ (favorite advice: ‘Use Threads for Blocking I/O, but not Parallelism,’ but it also covers asyncio and coroutines correctly) and ‘Robustness and Performance’ (advice given: ‘Profile before Optimizing’). It’s a joy to go through each section as everything I read is terrific best practice information smartly stated, and I’m considering quoting from this book in the future as it has such great advice all throughout. This is the definite winner for the ‘if you only read one Python book this year...’ contest.”
–Mike Bayer, Creator of SQLAlchemy
“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. The second edition updates the advice for Python 3, and it’s fantastic! I’ve been using Python for almost 20 years, and I learned something new every few pages. The advice given in this book will serve anyone well.”
–Titus Brown, Associate Professor at UC Davis
“Once again, Brett Slatkin has managed to condense a wide range of solid practices from the community into a single volume. From exotic topics like metaclasses and concurrency to crucial basics like robustness, testing, and collaboration, the updated Effective Python makes a consensus view of what’s ‘Pythonic’ available to a wide audience.”
–Brandon Rhodes, Author of python-patterns.guide
About the Author
Brett Slatkin is a principal software engineer at Google. He is the technical co-founder of Google Surveys, the co-creator of the PubSubHubbub protocol, and he launched Google’s first cloud computing product (App Engine). Fourteen years ago, he cut his teeth using Python to manage Google’s enormous fleet of servers. Outside of his day job, he likes to play piano and surf (both poorly). He also enjoys writing about programming-related topics on his personal website (https://onebigfluke.com). He earned his B.S. in computer engineering from Columbia University in the City of New York. He lives in San Francisco.
Product details
- Publisher : Addison-Wesley Professional
- Publication date : November 15, 2019
- Edition : 2nd
- Language : English
- Print length : 480 pages
- ISBN-10 : 0134853989
- ISBN-13 : 978-0134853987
- Item Weight : 2.31 pounds
- Dimensions : 7 x 0.9 x 9 inches
- Part of series : Effective Software Development
- Best Sellers Rank: #1,149,146 in Books (See Top 100 in Books)
- #988 in Python Programming
- #2,052 in Computer Programming Languages
- 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 AmazonTop reviews from the United States
- 5 out of 5 stars
Kept skills up to date
Reviewed in the United States on March 14, 2025Great refresher
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Best of all the python books I own.
Reviewed in the United States on May 16, 2020I own 8 python books as of right now. this is by far the best one in regards to writing "pythonic" code. most of the other books that I own focus on syntax, and how to write python code in the style that you would write in other languages. this book specifically shows you things specific to python. I would recommend one of the other books as a first, if you have never coded before, my favorite was python crash course, from no starch press.. but if you just want to learn python, and specifically how to be effective in python specific things, this is the book.
31 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
great book
Reviewed in the United States on February 12, 2021I've been programming in C, C++, and Java since the mid 90's. In the last year my job has transitioned to more python work. Python wasn't hard to pick up, almost made me feel guilty programming, but I was programming in python like I would in C, C++. Looking at others code a lot of their design decisions didn't make sense.
This book does a great job of explaining a lot of the python best practices.. and "quirks" of the language.
15 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 4 out of 5 stars
great content, but lousy layout and indentation
Reviewed in the United States on July 27, 2021I enjoyed book a lot, very inspiring and filled with insights.
However, code in the book has wrong indentations which make
it harder to read. I think publisher could use little polishing
3 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Useful, even for experienced Pythonista!
Reviewed in the United States on July 3, 2020I've been writing Python code for years, and this was a great introduction to new Python features and practices that will improve my code significantly. Some of the examples appear contrived and are too long, but overall I'm very happy with this book.
9 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Highly Recommend
Reviewed in the United States on December 15, 2019Great resource on what can feel like an overwhelming topic.
I’ve completed Automate The Boring Stuff and I’m about to finish an M.S. degree that included three python-related computer science courses. This book feels like about the right difficulty level for me. I would recommend it to anyone who has completed ATBS.
12 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Short but clear
Reviewed in the United States on February 11, 2022Each trick is short but explained very clear, no matter you are a beginner or advanced programmer.
Also add new features of python 3.
3 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Really well thought out, practical
Reviewed in the United States on March 11, 2020I bought this for our team, and we are enjoying reading through the items.
The tips are quite practical and useful.
I really like the Effective series of technical books. Very pragmatic and useful.
Definitely ups my coding proficiency.
6 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Top reviews from other countries
Barry Hall5 out of 5 starsThe best book on Python I have ever bought!
Reviewed in Canada on April 8, 2024This is a book for people who already know Python fairly well and want to take it to a higher level of mastery. It is not intended to be read sequentially from cover to cover but rather kept nearby for quick insight on how to do things better. It is not one of those giant 10lb books that tries to be the ultimate Python 'Bible'. It is compact, well written and printed on high quality paper. Get the paper back version not the e-book, you will never part with it!
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Pine Shelter5 out of 5 starsIdeal book for experienced programmers who are new to Python
Reviewed in the United Kingdom on March 10, 2020I was looking for a book that would explain the idiosyncrasies and native idioms of Python without treating me like an idiot. I've only read a few chapters, but I can say that this is an extremely intelligent, practical and well-written book. It's also pretty comprehensive. It makes a constant point of demonstrating potential traps and interesting Python-specific tips for those who come with substantial experience of other programming languages. It doesn't explain the basics of the language, but if you have read the official online Python tutorial, that is enough to move on to this book.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Client d'Amazon5 out of 5 starsa must read
Reviewed in France on March 15, 2022full of Technic to apply in our daily work
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Amazon カスタマー5 out of 5 starspython特有の文法を身につける
Reviewed in Japan on May 6, 2021この本を読むことで、Cライクな文法から脱却して、
pythonicな文法が書けるようになります。
MATLABの文法と似た部分もありますが、配列が
値渡しでなく、参照渡しである点など、違う部分も多いので、
python以外のスクリプト言語に慣れている人も一読する必要があるでしょう。
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Henry5 out of 5 starsGreat
Reviewed in South Africa on September 7, 2025Love this book
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again






















