Python Patterns

Python is my favorite language, and I have been writing it professionally for 13 year. Even though I have used it for so long, I keep improving and learning new tricks, both for Python and coding in general.

A share some of things I have learned in blog posts, shown below:

A watercolor drawing of a Spectacled Caiman fighting with a False Coral Snake by Maria Sibylla Merian. Python Patterns: max Instead of if
I often have to loop over a set of objects to find the one with the greatest score. You can use an if statement and a placeholder, but there are more elegant ways!