title: Python: value that occurs the most in a list
body: <p>I have a two list as follows</p>
  
  <pre><code>x = ['a','a','b','c','b','a']
  </code></pre>
  
  <p>and</p>
  
  <pre><code>x = ['a','a','b','c','c','d']
  </code></pre>
  
  <p>I'm trying to find which values occur the most in each of these lists. This is what I have tried.</p>
  
  <pre><code>def unique_values(output,input):
      for i in input:
          if i not in output:
              output.append(i)
  k = []
  for i in k:
      unique_values(k,x)
      y.remove(i)
  </code></pre>
  
  <p>I've gotten this far but I cant figure out how to stop the <code>for i in k:</code> before it removes all the values in the list.</p>