I am trying to compare a list of strings with a list of dictionaries. The output should be the same list of strings sorted in descending order of the sum their matching keys