diff --git a/02/game-help.py b/02/game-help.py index a253aeaa1..a2963b839 100644 --- a/02/game-help.py +++ b/02/game-help.py @@ -46,7 +46,7 @@ def _get_permutations_draw(draw): # From challenge 01: def max_word_value(words): """Calc the max value of a collection of words""" - return max(words, key=lambda w: calc_word_value(w)) + return max(words, key=calc_word_value) def main(): diff --git a/02/game-nohelp.py b/02/game-nohelp.py index 4b15f50fd..1531d09e5 100644 --- a/02/game-nohelp.py +++ b/02/game-nohelp.py @@ -16,11 +16,12 @@ def calc_word_value(word): # re-use from challenge 01 def max_word_value(words): """Calc the max value of a collection of words""" - return max(words, key=lambda w: calc_word_value(w)) + return max(words, key=calc_word_value) def main(): pass + if __name__ == "__main__": main()