Add Prime to get Fast, Free delivery
Amazon prime logo
Buy new:
-5% $28.50
FREE delivery Saturday, February 15 on orders shipped by Amazon over $35
Ships from: Amazon.com
Sold by: Amazon.com
$28.50 with 5 percent savings
List Price: $29.99
Get Fast, Free Shipping with Amazon Prime FREE Returns
FREE delivery Saturday, February 15 on orders shipped by Amazon over $35
Or fastest delivery Friday, February 14. Order within 18 hrs 55 mins
In Stock
$$28.50 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$28.50
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
$11.99
Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! See less
$3.99 delivery February 20 - 26. Details
Or fastest delivery February 19 - 24. Details
Only 1 left in stock - order soon.
$$28.50 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$28.50
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.
Ships from and sold by HPB-Ruby.
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.

Python Tricks: A Buffet of Awesome Python Features Paperback – October 25, 2017

4.6 4.6 out of 5 stars 1,906 ratings

{"desktop_buybox_group_1":[{"displayPrice":"$28.50","priceAmount":28.50,"currencySymbol":"$","integerValue":"28","decimalSeparator":".","fractionalValue":"50","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"a4LPrBayZKtcYBtOJagl%2FJxbvZUynwYbYK1FLLAa7VwzUkGvCVhZVhZ%2BwG9G9hTe13af%2FSdBbWSfwLmPDhvFCgHGsjZJ051mklcn1XrQOAzJv8fHrc5KM1yYryzIQn%2F7OCmHW5%2B9OmpWZxnfjm2wYg%3D%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$11.99","priceAmount":11.99,"currencySymbol":"$","integerValue":"11","decimalSeparator":".","fractionalValue":"99","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"a4LPrBayZKtcYBtOJagl%2FJxbvZUynwYbtQZfKit30Jff4zz03Ue96tNm4HZyvQWQqHI%2FqNGVvbakZv6%2BEo15X1RXTQkBh0xpVA2Pof2tlo8%2B7SDw0ujdrDinypSpzdoyq%2B%2FACJVBph4YoKTB8ty38HQ83rFMA0TVRX7UXEA4Y027B1yrBD7YSQcrvhzJzbTt","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

Purchase options and add-ons

“I don’t even feel like I’ve scratched the surface of what I can do with Python”

With Python Tricks: The Book you’ll discover Python’s best practices and the power of beautiful & Pythonic code with simple examples and a step-by-step narrative.

You'll get one step closer to mastering Python, so you can write beautiful and idiomatic code that comes to you naturally.

Learning the ins and outs of Python is difficult—and with this book you'll be able to focus on the practical skills that really matter. Discover the “hidden gold” in Python’s standard library and start writing clean and Pythonic code today.

Who Should Read This Book:

  • If you’re wondering which lesser known parts in Python you should know about, you’ll get a roadmap with this book. Discover cool (yet practical!) Python tricks and blow your coworkers’ minds in your next code review.
  • If you’ve got experience with legacy versions of Python, the book will get you up to speed with modern patterns and features introduced in Python 3 and backported to Python 2.
  • If you’ve worked with other programming languages and you want to get up to speed with Python, you’ll pick up the idioms and practical tips you need to become a confident and effective Pythonista.
  • If you want to make Python your own and learn how to write clean and Pythonic code, you’ll discover best practices and little-known tricks to round out your knowledge.

What Python Developers Say About The Book:

"I kept thinking that I wished I had access to a book like this when I started learning Python many years ago." — Mariatta Wijaya, Python Core Developer

"This book makes you write better Python code!" — Bob Belderbos, Software Developer at Oracle

"Far from being just a shallow collection of snippets, this book will leave the attentive reader with a deeper understanding of the inner workings of Python as well as an appreciation for its beauty." — Ben Felder, Pythonista

"It's like having a seasoned tutor explaining, well, tricks!" — Daniel Meyer, Sr. Desktop Administrator at Tesla Inc.

The%20Amazon%20Book%20Review
The Amazon Book Review
Book recommendations, author interviews, editors' picks, and more. Read it now.

Great on Kindle
Great Experience. Great Value.
iphone with kindle app
Putting our best book forward
Each Great on Kindle book offers a great reading experience, at a better value than print to keep your wallet happy.

Explore your book, then jump right back to where you left off with Page Flip.

View high quality images that let you zoom in to take a closer look.

Enjoy features only possible in digital – start reading right away, carry your library with you, adjust the font, create shareable notes and highlights, and more.

Discover additional details about the events, people, and places in your book, with Wikipedia integration.

Get the free Kindle app: Link to the kindle app page Link to the kindle app page
Enjoy a great reading experience when you buy the Kindle edition of this book. Learn more about Great on Kindle, available in select categories.

Frequently bought together

This item: Python Tricks: A Buffet of Awesome Python Features
$28.50
Get it as soon as Saturday, Feb 15
In Stock
Ships from and sold by Amazon.com.
+
$7.39
Get it as soon as Saturday, Feb 15
In Stock
Ships from and sold by Amazon.com.
+
$39.99
Get it as soon as Saturday, Feb 15
In Stock
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
Choose items to buy together.

Editorial Reviews

About the Author

Dan Bader is a software developer and consultant who helps Python programmers take their coding skills to the next level. His articles, videos, and trainings reach over half a million developers per year. Dan has more than 15 years of experience in software design and development and holds a bachelor's and a master's degree in Computer Science. Find out more about Dan at www.dbader.org.

Product details

  • Publisher ‏ : ‎ Dan Bader; 1st edition (October 25, 2017)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 301 pages
  • ISBN-10 ‏ : ‎ 1775093301
  • ISBN-13 ‏ : ‎ 978-1775093305
  • Item Weight ‏ : ‎ 14.3 ounces
  • Dimensions ‏ : ‎ 6 x 0.68 x 9 inches
  • Customer Reviews:
    4.6 4.6 out of 5 stars 1,906 ratings

About the author

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

Hey there! My name is Dan Bader and I’m a complete Python nut.

I’ve been obsessed with programming ever since I managed to convince my parents to buy me a dusty old Commodore 64 from the classifieds in a local newspaper. And my love for writing code hasn’t diminished since then.

Today I help Python developers take their coding skills and productivity to the next level. I’m an independent software engineer, author, and speaker. I’ve been developing software for 15 years—and I’d love to help you become a more proficient Python coder.

Customer reviews

4.6 out of 5 stars
1,906 global ratings

Review this product

Share your thoughts with other customers

Customers say

Customers find the book's explanations clear and easy to understand. They describe it as a great reference for Python programmers of all skill levels, including beginners. The content is described as interesting and valuable, covering a wide range of topics with useful examples. Readers find the book engaging and worth the money.

AI-generated from the text of customer reviews

74 customers mention "Ease of use"71 positive3 negative

Customers find the book easy to use. They appreciate the author's skill in constructing code snippets that illustrate Python concepts in very few lines. The examples are simple and easy to understand, with good programming practices and examples. The author does well in explaining the cases in conjunction with how the technology works.

"...Dan has a knack for constructing code snippets that illustrate Python concepts in very few lines, and also for writing extremely clear descriptions..." Read more

"...3. Concepts were very well described. Cons: 1...." Read more

"...The examples were more simple and easy to understand. Overall, I found this book to be more of a tutorial than a reference material...." Read more

"...Dan truly wants to help you become more proficient with Python...." Read more

67 customers mention "Useability"67 positive0 negative

Customers find the book useful for learning python best practices and ideas. They say it's a good reference for beginners and experienced coders alike. The author provides practical suggestions and an easy way of explaining complex concepts.

"...All in all, an excellent resource for someone with modest to moderate Python experience looking to round out their knowledge of some of the more..." Read more

"...I found this book both very fun and informative...." Read more

"...This book clarified some fuzzy concepts, and it introduced me to several new concepts...." Read more

"...This book is my favorite of the many quality instruction offerings provided by Real Python. I know I will be re-reading this book many times over...." Read more

12 customers mention "Content"12 positive0 negative

Customers find the book's content useful and interesting. They appreciate the clear explanations and examples, describing it as a good collection of Python resources. The book covers many subjects with a good flow of information.

"...2. Great and interesting topics with intermediate+ level examples. 3. Concepts were very well described. Cons: 1...." Read more

"...It was worth it just for that. The book covers a lot of subjects but there is a good flow of information...." Read more

"...The author covers a lot of topics that you will have questions about, and his writing style is superb!..." Read more

"...This book from Dan Bader is the distillation of some of the highest yield items in Real Python about intermediate-advanced features...." Read more

10 customers mention "Value for money"10 positive0 negative

Customers find the book offers good value for money and time.

"...It was worth it just for that. The book covers a lot of subjects but there is a good flow of information...." Read more

"...Bottomline, for $10 (currently on sale) this is a bargain on the Kindle! Grab your copy today..." Read more

"...Well worth the money. It's also a good general reference that I'll rely on for probably many years." Read more

"...Python books but this is a great reference for anyone and is excellent value for money. I highly recommend this book." Read more

9 customers mention "Fun to read"9 positive0 negative

Customers find the book engaging and fun to read.

"...I found this book both very fun and informative...." Read more

"...But, I can also say that I am definitely enjoying the challenge...." Read more

"...The content is very clear, good depth, and interesting. The lack of an index is a huge problem though." Read more

"...It's fun to sort of get lost in the concepts. I feel that there was a need for some practical use cases that the average person?....." Read more

7 customers mention "Tricks"7 positive0 negative

Customers find the book helpful with reminders and useful tricks. They appreciate the code examples that show why curtain tricks are useful and how to convert code. The book is full of useful and up-to-date tricks and recipes to improve your code.

"...I so appreciate the dive into the hows and whys of these tricks, which offer insights that are often applicable to other Python tools and concepts..." Read more

"...Lots of code examples to prove why curtain tricks are useful and how to convert your code to be more pythonic. Would recommend!" Read more

"Dan wrote a great book full of useful and up to date tricks and recipes to improve your python coding skills...." Read more

"Great set of useful python tricks!..." Read more

Great resource for intermediate Python users to round out their knowledge of the language
5 out of 5 stars
Great resource for intermediate Python users to round out their knowledge of the language
I consider myself an 'early intermediate' Pythonista, with about three years of self-taught experience in the language, bolstered by all the good resources out there online. I first ran across Dan's page/blog through a Twitter link, I think, and have really enjoyed his Python Tricks emails. Some of them aren't news to me, but there have been multiple instances where they've given me a key insight into the behavior of Python, or an idea that's helped me improve my projects.As he notes in the Introduction, this book grew out of the Python Tricks emails, and it really shows. Dan has a knack for constructing code snippets that illustrate Python concepts in very few lines, and also for writing extremely clear descriptions of why they behave as they do. Further, even though Dan has years of Python experience, it seems clear to me he hasn't lost the sense of the ways in which Python can be confusing to new learners. I've only sampled here and there from his Buffet at this point, but have already gained two new concrete pieces of knowledge: bytearrays are mutable whereas bytes are not; and all it takes to create an abstract base class is to use metaclass=ABCMeta and decorate as needed with @abstractmethod. Even though I'd looked at the Python documentation for both of these before, I never quite understood either of them. But, Dan's phrasing and presentation made them crystal clear on my first read.One additional thing I like about the book is how Dan has included bits and pieces of his philosophy on Python, programming, writing good code, etc. Some people might be turned off by the editorializing, I suppose, but I really appreciate that the book provides these sorts of "meta" perspectives.All in all, an excellent resource for someone with modest to moderate Python experience looking to round out their knowledge of some of the more subtle features/behaviors of the language.
Thank you for your feedback
Sorry, there was an error
Sorry we couldn't load the review

Top reviews from the United States

  • Reviewed in the United States on November 14, 2017
    I consider myself an 'early intermediate' Pythonista, with about three years of self-taught experience in the language, bolstered by all the good resources out there online. I first ran across Dan's page/blog through a Twitter link, I think, and have really enjoyed his Python Tricks emails. Some of them aren't news to me, but there have been multiple instances where they've given me a key insight into the behavior of Python, or an idea that's helped me improve my projects.

    As he notes in the Introduction, this book grew out of the Python Tricks emails, and it really shows. Dan has a knack for constructing code snippets that illustrate Python concepts in very few lines, and also for writing extremely clear descriptions of why they behave as they do. Further, even though Dan has years of Python experience, it seems clear to me he hasn't lost the sense of the ways in which Python can be confusing to new learners. I've only sampled here and there from his Buffet at this point, but have already gained two new concrete pieces of knowledge: bytearrays are mutable whereas bytes are not; and all it takes to create an abstract base class is to use metaclass=ABCMeta and decorate as needed with @abstractmethod. Even though I'd looked at the Python documentation for both of these before, I never quite understood either of them. But, Dan's phrasing and presentation made them crystal clear on my first read.

    One additional thing I like about the book is how Dan has included bits and pieces of his philosophy on Python, programming, writing good code, etc. Some people might be turned off by the editorializing, I suppose, but I really appreciate that the book provides these sorts of "meta" perspectives.

    All in all, an excellent resource for someone with modest to moderate Python experience looking to round out their knowledge of some of the more subtle features/behaviors of the language.
    Customer image
    5.0 out of 5 stars
    Great resource for intermediate Python users to round out their knowledge of the language

    Reviewed in the United States on November 14, 2017
    I consider myself an 'early intermediate' Pythonista, with about three years of self-taught experience in the language, bolstered by all the good resources out there online. I first ran across Dan's page/blog through a Twitter link, I think, and have really enjoyed his Python Tricks emails. Some of them aren't news to me, but there have been multiple instances where they've given me a key insight into the behavior of Python, or an idea that's helped me improve my projects.

    As he notes in the Introduction, this book grew out of the Python Tricks emails, and it really shows. Dan has a knack for constructing code snippets that illustrate Python concepts in very few lines, and also for writing extremely clear descriptions of why they behave as they do. Further, even though Dan has years of Python experience, it seems clear to me he hasn't lost the sense of the ways in which Python can be confusing to new learners. I've only sampled here and there from his Buffet at this point, but have already gained two new concrete pieces of knowledge: bytearrays are mutable whereas bytes are not; and all it takes to create an abstract base class is to use metaclass=ABCMeta and decorate as needed with @abstractmethod. Even though I'd looked at the Python documentation for both of these before, I never quite understood either of them. But, Dan's phrasing and presentation made them crystal clear on my first read.

    One additional thing I like about the book is how Dan has included bits and pieces of his philosophy on Python, programming, writing good code, etc. Some people might be turned off by the editorializing, I suppose, but I really appreciate that the book provides these sorts of "meta" perspectives.

    All in all, an excellent resource for someone with modest to moderate Python experience looking to round out their knowledge of some of the more subtle features/behaviors of the language.
    Images in this review
    Customer image
    47 people found this helpful
    Report
  • Reviewed in the United States on May 23, 2019
    I am not a big fan of reading books in general. But, I just finished reading through every chapters in this book after 13 days of daily reading. I found this book both very fun and informative. If you are looking for something more than beginner python tutorials, this book will surely do a good job to satisfy some of the thirst that you had. Here are some Pros/Cons of the book.

    Pros:
    1. Good book material quality and size (small but also perfect thickness to carry around).
    2. Great and interesting topics with intermediate+ level examples.
    3. Concepts were very well described.

    Cons:
    1. Books lacks colors, It seems like HTMl version of this must have used some Markdown but the book is just plain black/white texts.
    2. Wish there were some more examples per topics.
    3. Chapters/Topics are short enough that *key takeaways* section can seem bit redundant. Maybe some kind of *quiz* or some kind of *small mission for readers to go find out* type of section would been more useful IMO.

    But, I really enjoyed this book. So how about you give it a try as well?
    Customer image
    5.0 out of 5 stars
    Probably one of the best programming book I've read in a while.

    Reviewed in the United States on May 23, 2019
    I am not a big fan of reading books in general. But, I just finished reading through every chapters in this book after 13 days of daily reading. I found this book both very fun and informative. If you are looking for something more than beginner python tutorials, this book will surely do a good job to satisfy some of the thirst that you had. Here are some Pros/Cons of the book.

    Pros:
    1. Good book material quality and size (small but also perfect thickness to carry around).
    2. Great and interesting topics with intermediate+ level examples.
    3. Concepts were very well described.

    Cons:
    1. Books lacks colors, It seems like HTMl version of this must have used some Markdown but the book is just plain black/white texts.
    2. Wish there were some more examples per topics.
    3. Chapters/Topics are short enough that *key takeaways* section can seem bit redundant. Maybe some kind of *quiz* or some kind of *small mission for readers to go find out* type of section would been more useful IMO.

    But, I really enjoyed this book. So how about you give it a try as well?
    Images in this review
    Customer imageCustomer imageCustomer image
    6 people found this helpful
    Report
  • Reviewed in the United States on November 7, 2017
    The main reason why I bought the book is because I like Dan's blog.
    I consider my Python level to be intermediate. I have completed reading 100 pages(1/3 of the book). Although the content is decent, this feels like it is targeted more towards beginner(not an absolute beginner) than intermediate level. I am hardly learning anything new that is already not in Fluent Python (which is a big ass book in comparison but provides better understanding of the Pythonic tricks) or in Raymond Hettinger or David Beazley’s videos on YouTube.

    I will update the review once I finish reading the entire book.

    Update: I finished reading the book and I still stand by what I said earlier. If you have time and patience, go with Fluent python. Other than the new style string formatting, rest of the content is mostly covered in that.
    That does not mean this is not a good book. I really loved some of the chapters like generators, iterators. The examples were more simple and easy to understand. Overall, I found this book to be more of a tutorial than a reference material. Mainly because I use the excellent pymotw website for the Collections part of the book.
    211 people found this helpful
    Report
  • Reviewed in the United States on May 3, 2023
    I'm new to Python. This book clarified some fuzzy concepts, and it introduced me to several new concepts.

    Dan truly wants to help you become more proficient with Python. Several times throughout the book, he uses phrases such as "Think of it this way …" or "Another way to look at this is …". At the end of each chapter, he summarizes the "Key Takeaways".

    Dan recommends "Best Practices". He mentions specific ways of doing things that (although not required) are the way that the Python community expects them to be done.

    I'm sure I'll be referring back to this book as I progress as a Python programmer.
    3 people found this helpful
    Report
  • Reviewed in the United States on June 9, 2023
    I am a prior IBM employee & retiree. I coded in Fortran, 360 assembler, Cobal, RPG2 for S/3 and AS400 level systems, Visual Basic, C, C++, VBA for Access, Excel, Word, etc. I was always a "part time" programmer in a consulting role. I decided to tackle, or be tackled by, Python in my retirement. I know I am not saying anything that is unknown by stating Python is NOT an easy learn. But, I can also say that I am definitely enjoying the challenge. This book is my favorite of the many quality instruction offerings provided by Real Python. I know I will be re-reading this book many times over. Great job !
    5 people found this helpful
    Report

Top reviews from other countries

Translate all reviews to English
  • Ehsan Danesh
    5.0 out of 5 stars very well written book with very well thought right to the point examples
    Reviewed in Canada on March 20, 2024
    Very well written
    Small examples right to the point
    If you have a problem with some books that you need to understand their big examples to understand the subject this book is right for you. It keeps examples small and exactly about what subject it explains.
  • Guillardi
    5.0 out of 5 stars Do básico ao avançado... Bastante conteúdo.
    Reviewed in Brazil on January 2, 2022
    O autor começa com pinceladas básicas e vai avançando com exemplos práticos para o perfeito entendimento. Valeu muito a pena a leitura.
  • Gero Zayas
    5.0 out of 5 stars Es un libro MAGNÍFICO y con ejemplos de código espećificos.
    Reviewed in Spain on February 1, 2025
    Se aleja de platitudes y te enseña verdaderamente cómo mejorar tu nivel de Python. Es un libro que siempre recomendaría a Python developers, 100%.
  • Gayatri
    5.0 out of 5 stars Very informative and explained in simple language
    Reviewed in India on September 28, 2024
    This book is for anyone interested in learning more on python.
    Concepts, package are explained beautifully without going too deep into internal workings which usually breaks the line of thought.
  • MST
    5.0 out of 5 stars Znakomita, nadal aktualna
    Reviewed in Poland on June 15, 2024
    Znakomita książka dla osób które potrafią co nieco programować w Pythonie, ale zdają sobie sprawę, że są w tym języku pewne konstrukcje, które nie wiadomo do czego służą, nie wiadomo w jakich sytuacjach warto z nich skorzystać, do czego mogą być potrzebne i są często pomijane w tutorialach dla początkujących. Autor świetnie nawiązuje do własnych doświadczeń, wskazując na te elementy, których sam do końca nie rozumiał i nie używał programując kiedyś w Pythonie. W bardzo przystępny sposób, na trafionych przykładach, rozkłada na czynniki pierwsze przeznaczenie takich elementów, potencjalne scenariusze wykorzystania i potencjalne błędy jakie mogą wynikać z braku zrozumienia ich mechaniki działania. Dodatkowo do książki dostajemy dostęp do 12-stu dodatkowych lekcji video. Fajny, lekki język, trafiona tematyka, sprawiająca że czytając wstęp rozdziałów czytelnik zdaje sobie sprawę, że ma podobne odczucia co autor na początku jego kariery programowania. Wzbudza to naturalną ciekawość, po co to jest, jak działa i czy potrzebuję z tego kiedykolwiek korzystać. Książka nadal aktualna w roku 2024, warta zakupu. Przyzwoite wydanie papierowe. Polecam.