Python 3 Scrabble Task 15 - update_point_totals()

I am not be able to converting the nested loops into a function. Can anyone help me out?
player_to_points = {}
for player,words in player_to_words.items():
player_points = 0
for word in words:
player_points += score_word(word)
player_to_points[player] = player_points
print(player_to_points)

What does your class look like?

1 Like

Thanks. Sorted it already

1 Like