Trey Hunner 🐍treyhunner@mastodon.social
Nov 26, 2026, 9:01 PMThe default argument works alongside a key function too (see tip #146):
>>> words = []
>>> max(words, key=len, default="")
''
https://mastodon.social/@treyhunner/116642735390111739
🧵 (3/3)