title: Python - counting duplicate strings
body: <p>I'm trying to write a function that will count the number of word duplicates in a string and then return that word if the number of duplicates exceeds a certain number (n). Here's what I have so far:</p>
  
  <pre><code>from collections import defaultdict
  
  def repeat_word_count(text, n):
    words = text.split()
    tally = defaultdict(int)
    answer = []
  
    for i in words:
      if i in tally:
        tally[i] += 1
      else:
        tally[i] = 1
  </code></pre>
  
  <p>I don't know where to go from here when it comes to comparing the dictionary values to n.</p>
  
  <p>How it should work: 
  repeat_word_count("one one was a racehorse two two was one too", 3) should return ['one']</p>