Skip to content

Instantly share code, notes, and snippets.

@halirutan
Created August 14, 2021 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halirutan/80004ae231caee78072e1fcb4b236b0e to your computer and use it in GitHub Desktop.
Save halirutan/80004ae231caee78072e1fcb4b236b0e to your computer and use it in GitHub Desktop.
l = [[1, 2, 3], [2, 3, 3], [1, 3, 3]]
def find_max(lis):
tmp = list()
for i in lis:
tmp.append(sum(i))
return lis[tmp.index(max(tmp))]
print(find_max(l))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment