title: Python getting the key of the highest value in dictionary, without using inbuilt functions
body: <p>How should we get the <strong><em>key of the highest value</em></strong> in python dictionary without using a inbuilt functions</p>
  
  <pre><code>{1: 1, 2: 1, 3: 1, 4: 3, 5: 2} **Expecting answer to be 4**
  </code></pre>
  
  <p>This can be easily done by </p>
  
  <pre><code>max_key = max(check, key=lambda k: check[k])
  </code></pre>
  
  <p>But wanted to try without builtin function(without max, lambda)</p>
  
  <p>Any help is much appreciated </p>
  
  <p><strong>my full code</strong></p>
  
  <pre><code>def array(num):
      check={}
      for i in range(len(num)):
          if num[i] in check:
              check[num[i]]+=1
          else:check[num[i]]=1
  
      max_key = max(check, key=lambda k: check[k])
  
  
  
  array([1,2,3,4,5,4,5,4])
  </code></pre>