Minimum price
Suggested price


Write elegant Python code

About the Book

Now on Gumroad

I have moved the book from Leanpub.

It is still free, don't worry!

You can get the book from this link:


The “Pydon'ts – Write beautiful Python code” book is a compilation of all the “Pydon't” articles available at

These articles guide you through the core Python language, showing you how to use every single feature to write better, more elegant Python programs.

Tanner S., from the USA, says “[The book] seems to be extremely well put together, unlike some other books on Python I've read recently. It's a good book. I like how to the point it is.”.

Each chapter of the book (corresponding to a single article in the linked blog) guides you through a specific feature of the Python language, teaching you how to use it and then showing you good example usages of that feature with examples of real Python code: some times you even get to dive into the code that implements the Python Standard Library.

This book is for beginners and advanced users alike, as it covers a wide range of Python features, so everyone has something to learn from the contents of this book.

Alonso, from Mexico, says “First of all, thank you thank you and thank you again for a beautiful ebook with such amazing content. If you're a beginner or a more experienced pythonista, pydon'ts will still achieve its purpose. Beautifully designed and explained! Definitely worth the reading. I'm reading it once more in a year or so!”.

This book is a work in progress and I publish a chapter per week at

You can read everything for free by following the previous link. However, notice that by purchasing the book now, you will get future updates for free, plus all the special content I add only to the book!

As the book becomes more complete, I will be increasing the minimum purchase price so right now is an excellent time to buy the book ?.

(By the way, if for some reason you are not happy with your purchase, you have 45 days to ask for a refund, no questions asked. It is LeanPub's policy!)

  • Share this book

  • Categories

    • Computers and Programming
    • Python
    • Programming Cookbooks
  • Feedback

    Email the Author(s)

About the Author

Rodrigo Girão Serrão @ Mathspp
Rodrigo Girão Serrão @ Mathspp

As a mathematics and programming enthusiast, the only thing I enjoy more than learning is sharing my knowledge.

I write regularly at and I conduct workshops and courses whenever I find the chance. There's nothing more rewarding than making people excited about these sciences!

Bundles that include this book

Bought separately
Bundle Price

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub