Last active
July 21, 2019 17:06
-
-
Save BenMaydan/a0b7a834d622369d2e25440c6918c6b6 to your computer and use it in GitHub Desktop.
A new max function for python that works on tuples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def maximum(*lists): | |
mapping = {sum(l):l for l in lists} | |
return mapping[max(mapping.keys())] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment