First, create a dictionary of values from your word list. You can do this by calling create_word_value_dict()
and saving the result to a variable. Second, find the maximum value from that dictionary. You can either use the function:
def find_greatest_value(elements_list):
greatest_value = elements_list[0]
for element in elements_list:
if element > greatest_value:
greatest_value = element
return greatest_value
or you can use the max()
function to get the max value from the dictionary values.
Finally, iterate over the keys and values of the word-value dictionary, compare the value of each key to the maximum found value, and append this to the new dictionary.