Become smarter about Python in 2 minutes

Short, actionable, powerful tips to sharpen your code.

Become smarter about Python

Instant download (PDF + EPUB)

Book cover

What you get

100+ short, actionable Python tips.

Ebook with no fluff.

Diagrams with code examples for each tip.

10 new tips every two weeks.

Why did I write this book?

I write a daily newsletter called “Python drops 🐍💧” where I send these tips to people's inboxes.

I know you have to focus on your job, writing actual code, reviewing PRs, debugging issues, and a dozen of other responsibilities. You don't have the time to do research, so I do it for you!

Each day, I send a random tip to your inbox so you can reap the benefits without the hassle. In 2 minutes you read the tip, inspect the diagram, and learn something new!

I got great feedback from the tips I sent, so I started collecting them in this ebook, so that you can reference it and have easy access to the backlog of all the tips I already shared.

Don't buy this book if you

  • Are looking for a full language reference – this book only contains short tips.
  • Like to accumulate useless knowledge – each tip in this book is actionable.
  • Want to stay at the same level – the tips are very diverse, so there's always something new for everyone.

Buy this book if you

  • Want bite-sized tips to improve your Python skills.
  • Don't have time to waste reading walls of text filled with fluff.
  • Like clear diagrams with clear examples.

What you'll learn

This book contains dozens of Python tips and will teach you things like:

  • recipes with the modules collections, itertools, and more;
  • how to work with regular expressions without fearing them;
  • better patterns and tools for file I/O; and
  • much more.

Sneak peek

Here is tip 24, “longest word in a string”:

The built-in max has a keyword parameter key that determines how objects are compared, allowing flexible comparisons.

For example, the idiom max(..., key=len) lets you find the longest item in a collection, namely, the longest word in a string:

s = "These are just some sensational words"
print(
    max(s.split(), key=len)
)  # sensational

The built-ins min and sorted also have this keyword parameter.

What readers say

Michel Laevens

As always, Rodrigo put in a lot of effort to produce quality content at affordable prices.

Michel Laevens Python drops book reader

Elias Dorneles

I very much enjoy receiving Rodrigo's Python tips on my email. They're bite-sized and informative, just great as a daily dopamine hit!

Elias Dorneles Python drops subscriber

Andrew Hartung

The diagrams are always so well done they don't even need supporting text.

Andrew Hartung Python drops subscriber

Roberto Polli

I always recommend Rodrigo's posts to friends and colleagues.

Newcomers will learn Python concepts in an engaging way, and experienced programmers can refresh their knowledge and even learn something new about latest Python releases.

Thanks Rodrigo!

Roberto Polli Python drops subscriber

Sean

This is a great daily read regardless of your Python level. Within a minute or two; you are introduced to a language component or mechanism, a common use case for it, and example code demonstrating it.

Sean – Staff Engineer for an American Telco, Python drops subscriber

Nico Belgraver

Quality and fun. Highly recommended!

Nico Belgraver – NavApp, Python drops subscriber

Alexandre B A Villares

Rodrigo, your "tip cards" have been smashing, elegant and informative! Thank you for sharing them!

Alexandre B A Villares – Python teacher, Python drops subscriber

David Thorvaldsen

I really enjoy your Python drops! So much new exposure to what's possible with the language!

David Thorvaldsen – AI/ML Data Scientist @ Caterpillar Inc., Python drops subscriber

Robert Lucente

Love the short to the point code snippets. Then you really bring it home with graphics. Just awesome.

Robert Lucente – Author of The Bit Plumber, Python drops subscriber

Roberto

Very interesting, looks like every time I read your posts I learn something new!

Roberto Python drops subscriber

Become smarter about Python


  • Instant download – e-book in PDF & EPUB formats.
  • Bonus PDF – all diagrams compiled into a set of flashcards.
  • Free updates – the book is updated with new tips every two weeks, which makes it more expensive.

About the author

Hi, I'm Rodrigo Girão Serrão from sunny Portugal 🇵🇹.

I'm a prolific Python author and speaker, with multiple books published independently and dozens of talks and tutorials given at the largest Python conferences in the world. I also blog frequently about Python and publish two Python newsletters: the mathspp insider and the daily Python drops 🐍💧.

I have extensive experience teaching people from all walks of life – from kids in school, to professionals in various industries, to retirees – and there is a clear consensus that my students enjoy my clear examples, the live-coding during my lessons, and most surprisingly: my quirky sense of humour.

Don't waste this gift

I spend hours researching the Python language, its standard library, and popular projects. I spend hours distilling the patterns and idioms they use, so that I can share them with you.

You can get access to that distilled knowledge, in bite-sized drops of knowledge, without the fuss:


Or don't, it's up to you!