title: Working with Dictionary Values and Keys
body: <pre><code>def wordtally():
      test1 = "One day, Jimmy Jimmy Jimmy."
      no_punct = test1.strip(".")
      split = no_punct.split()
      subscript = 0
      D = {}
      split = no_punct.split()
      for n in split:
          if n in D.keys():
              D[n] += 1
          else:
              D[n] = 1
      return max(D.values())
  </code></pre>
  
  <p>My code right now returns the largest value, which is three, but I want it to return the key at which that value appears. When I try to use the key function, an error comes up that says it doesn't take any arguments. Is there a way to this?</p>