Add Prime to get Fast, Free delivery
Amazon prime logo
Buy new:
-35% $45.37
FREE delivery Saturday, February 15
Ships from: Amazon.com
Sold by: Amazon.com
$45.37 with 35 percent savings
List Price: $69.99
FREE Returns
FREE delivery Saturday, February 15
Or Prime members get FREE delivery Tomorrow, February 11. Order within 1 hr 39 mins.
In Stock
$$45.37 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$45.37
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Ships from
Amazon.com
Amazon.com
Ships from
Amazon.com
Sold by
Amazon.com
Amazon.com
Sold by
Amazon.com
Returns
30-day refund/replacement
30-day refund/replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
$41.28
FREE Returns
Eligible for FREE Super Saving Shipping! Fast Amazon shipping plus a hassle free return policy mean your satisfaction is guaranteed! Tracking number provided in your Amazon account with every order. Eligible for FREE Super Saving Shipping! Fast Amazon shipping plus a hassle free return policy mean your satisfaction is guaranteed! Tracking number provided in your Amazon account with every order. See less
FREE delivery Saturday, February 15
Or Prime members get FREE delivery Wednesday, February 12. Order within 12 hrs 24 mins.
Only 1 left in stock - order soon.
$$45.37 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$45.37
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Access codes and supplements are not guaranteed with used items.
Kindle app logo image

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.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Effective Python: 90 Specific Ways to Write Better Python (Effective Software Development Series) 2nd Edition

4.7 4.7 out of 5 stars 427 ratings

{"desktop_buybox_group_1":[{"displayPrice":"$45.37","priceAmount":45.37,"currencySymbol":"$","integerValue":"45","decimalSeparator":".","fractionalValue":"37","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"mzHLtKWXY2IGWBuEFiskrpphIB%2FpcUPLmLYZPGps3lcCFAAaixcnGpH2cEqOY4JO6kFb4iEU7oX%2BhR72zo%2BF%2BmZDYRYsOqxI7NkiR2rvn2KZg06y78KMBKlfsQ7tZAgmmxUIxLrbPXJs6jx%2FbuIsXw%3D%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$41.28","priceAmount":41.28,"currencySymbol":"$","integerValue":"41","decimalSeparator":".","fractionalValue":"28","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"mzHLtKWXY2IGWBuEFiskrpphIB%2FpcUPLI8oEROy8U3lhpilBf%2FZcTxVPc0IUEEn64WkVbi%2FD3RKMakvbzxambUhxfugudOn810ho9gB9%2FCPS8Q91loWCg%2B5XLTf5GonbCro80Q%2F71AWZ30PmP2h1989iXvhY2aK7s%2BA9SyLl0BQ8lOmd6rydgg%3D%3D","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

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.

Frequently bought together

This item: Effective Python: 90 Specific Ways to Write Better Python (Effective Software Development Series)
$45.37
Get it as soon as Saturday, Feb 15
In Stock
Ships from and sold by Amazon.com.
+
$43.99
Get it as soon as Saturday, Feb 15
In Stock
Ships from and sold by Amazon.com.
+
$37.70
Get it as soon as Saturday, Feb 15
Only 20 left in stock (more on the way).
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
spCSRF_Treatment
Some of these items ship sooner than the others.
Choose items to buy together.

From the Publisher

Woman reading book by the computer

Read this book if you want to write

Dancer in the air

exceptionally robust and well-performing code

Pocket watch

code that’s easier to understand, maintain, and improve

Perfect diamond

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; 2nd edition (November 15, 2019)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 480 pages
  • ISBN-10 ‏ : ‎ 0134853989
  • ISBN-13 ‏ : ‎ 978-0134853987
  • Item Weight ‏ : ‎ 2.31 pounds
  • Dimensions ‏ : ‎ 7 x 0.9 x 9 inches
  • Customer Reviews:
    4.7 4.7 out of 5 stars 427 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Brett Slatkin
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Brett Slatkin is the author of the book Effective Python and has been writing Python code professionally for the past 19 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

4.7 out of 5 stars
427 global ratings

Review this product

Share your thoughts with other customers

Customers say

Customers find the book's content helpful and informative. They appreciate the clear explanations and examples that help them understand pythonic code writing. The book is described as an effective resource for learning python and considered the best of its kind.

AI-generated from the text of customer reviews

Select to learn more
8 customers mention "Content"8 positive0 negative

Customers find the book's content useful and engaging. They appreciate the practical approach and deep knowledge it provides on Python features and practices. While some of the layout and indentation issues are mentioned, overall, customers find the content helpful and insightful.

"...this book specifically shows you things specific to python...." Read more

"...been writing Python code for years, and this was a great introduction to new Python features and practices that will improve my code significantly...." Read more

"...Also add new features of python 3." Read more

"...I really like the Effective series of technical books. Very pragmatic and useful. Definitely ups my coding proficiency." Read more

7 customers mention "Clarity"5 positive2 negative

Customers find the book helpful for learning pythonic code. They appreciate the clear explanations and examples, whether you're a beginner or experienced. The book is well-written and practical, making it useful for coding.

"...this is by far the best one in regards to writing "pythonic" code...." Read more

"Each trick is short but explained very clear, no matter you are a beginner or advanced programmer. Also add new features of python 3." Read more

"...The tips are quite practical and useful. I really like the Effective series of technical books. Very pragmatic and useful...." Read more

"Well written with examples to make one understand pythonic way of writing code." Read more

Top reviews from the United States

  • Reviewed in the United States on May 16, 2020
    I 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.
    28 people found this helpful
    Report
  • Reviewed in the United States on July 3, 2020
    I'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.
    8 people found this helpful
    Report
  • Reviewed in the United States on February 11, 2022
    Each 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 helpful
    Report
  • Reviewed in the United States on February 12, 2021
    I'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.
    12 people found this helpful
    Report
  • Reviewed in the United States on July 27, 2021
    I 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 helpful
    Report
  • Reviewed in the United States on March 11, 2020
    I 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 helpful
    Report
  • Reviewed in the United States on December 15, 2019
    Great 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 helpful
    Report
  • Reviewed in the United States on March 19, 2020
    A great book on pythonic thinking and best practices in Python.
    I only wish there would be mention of more common patterns such as factory patterns, etc.
    Overall a lot of deep knowledge, though.
    6 people found this helpful
    Report

Top reviews from other countries

Translate all reviews to English
  • Barry Hall
    5.0 out of 5 stars The best book on Python I have ever bought!
    Reviewed in Canada on April 8, 2024
    This 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!
  • Client d'Amazon
    5.0 out of 5 stars a must read
    Reviewed in France on March 15, 2022
    full of Technic to apply in our daily work
  • F.
    5.0 out of 5 stars A must have for Python programmers
    Reviewed in Spain on August 21, 2021
    This book Will help you mastering your Python skills and devoloping software in real world situations.

    The way of ordering the book content is wondeffull. It has 90 items (ordered in general topics). You can read each item individually when you want to remember how to use a tool or a concept.

    The book comes with a very nice paper, It feels like plastic paper and It is very confortable.
  • Rodrigo Zamora
    5.0 out of 5 stars Simplemente excelente
    Reviewed in Mexico on July 17, 2020
    Este libro es fácil de entender, da muy buenas recomendaciones y técnicas para hacer tu código de alta calidad y
    eficiente, es un libro de referencia que debes tener.
    La calidad es excelente y viene a color algo que siempre se agradece, las hojas son gruesas y plastificadas lo que le dan gran resistencia, el único pero, es que presenta un reflejo producto del tipo de papel que hace que leer sea dificil ne fuentes de luz directa, por lo demás esta perfecto
  • Georges Seil
    5.0 out of 5 stars Python ohne Kursus lernen
    Reviewed in Germany on November 30, 2020
    Ds Buch ist sehr strukturiert und klar aufgebaut.
    Absolut empfehlenswert vom Einsteiger bis zum Spezialisten. Auch Spezialisten brauchen manchmal Gedächnishilfen.
    Ich habe mir dieses Buch zusammen mit "The Python Quick Syntax Reference" gekauft um zum einen eine sehr detaillierte Referenz und zum anderen eine schnelle Beispiel Library zu nutzen.