title: How to print only the highest value for a key amongst other values?
body: <p>I run into a problem when attempting to solve this task so I'm here after failing a few times, I was wondering how could I only print the highest value(score) for a key (name) when a key stores multipile values such as:</p>
  
  <pre><code>Rob Scored: 3,5,6,2,8
  </code></pre>
  
  <p>So the key would be "Rob" and the values would be his scores above. And I need an output of <code>Rob Scored: 8</code> however I still need the dictionary to store the previous scores to then print an average score for each key(name).</p>
  
  <p>So far I have this code and attempted to use <code>max</code> however I failed miserably.</p>
  
  <pre><code>from collections import OrderedDict
  dictionary = {}
  
  f = open('ClassA.txt', 'r')
  d = {}
  for line in f:
      firstpart, secondpart = line.strip().split(':')
      dictionary[firstpart.strip()] = secondpart.strip()
      columns = line.split(": ")
      letters = columns[0]
      numbers = columns[1].strip()
      if d.get(letters):
          d[letters].append(numbers)
      else:
          d[letters] = list(numbers)
  sorted_dict = OrderedDict(
  sorted((key, list(sorted(vals, reverse=True))) 
         for key, vals in d.items()))
  print (sorted_dict)
  </code></pre>