title: Trying to find majority element in a list
body: <p>I'm writing a function to find a majority in a Python list.</p>
  
  <p>Thinking that if I can write a hash function that can map every element to a single slot in the new array or to a unique identifier, perhaps for a dictionary, that should be the best and it should be undoable. I am not sure how to progress. My hash function is obviously useless, any tips on what I can/should do, or if this is even a reasonable approach?</p>
  
  <pre><code>def find_majority(k):
      def hash_it(q):
          return q
  
      map_of = [0]*len(k)
  
      for i in k:
          mapped_to = hash_it(i) #hash function
          map_of[mapped_to]+=1
  
  
  find_majority([1,2,3,4,3,3,2,4,5,6,1,2,3,4,5,1,2,3,4,6,5])
  </code></pre>