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.
This book contains dozens of Python tips and will teach you things like:
collections
, itertools
, and more;Here is tip 24, “longest word in a string”:
The built-in
max
has a keyword parameterkey
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
andsorted
also have this keyword parameter.
As always, Rodrigo put in a lot of effort to produce quality content at affordable prices.
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!
The diagrams are always so well done they don't even need supporting text.
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!
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.
Quality and fun. Highly recommended!
Rodrigo, your "tip cards" have been smashing, elegant and informative! Thank you for sharing them!
I really enjoy your Python drops! So much new exposure to what's possible with the language!
Love the short to the point code snippets. Then you really bring it home with graphics. Just awesome.
Very interesting, looks like every time I read your posts I learn something new!
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.
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!