title: How to find the max value in a hash table that is manually implemented?
body: <p>Hi I'm new to Python and I implemented a hash table that counts the number of occurences of a letter in a word.</p>
  
  <p>For example the hash table currently stores this:</p>
  
  <pre><code>{l:1, r:1, t:1, u:1, a:1, c:1, d:2, e:1, }
  </code></pre>
  
  <p>I want to find the max value in the hash table, which is 2. I implemented an iterator so I can iterate through the hash table.  I managed to find the max value like this:</p>
  
  <p>EDIT: I implemented a hashtable class with the set item, get item functions.</p>
  
  <pre><code>class HashTableQuadratic:
  
  def __init__(self, size=10):
      self.count = 0
      self.table_size = size
      self.array = build_array(self.table_size)
      self.collision=0
      self.totalProbeLength=0
  
   //some code here
  
  
  tempList=[]
  for item in hashTable:
  if item!=None:
      tempList.append(item[1])
  maxNum=max(tempList)
  print(maxNum)
  </code></pre>
  
  <p>But is there a better way to do it without using a tempList and max built in function?</p>