title: Find the smallest element in a list
body: <p>I would like to find the smallest value of list <code>a</code>. I know that there is a function like <code>min()</code> to find the value but I would like do it work with a <code>for</code>-loop.
  I get the error <code>Index out of range</code> with the <code>if</code>-Statement, but I don't know why.</p>
  
  <pre><code>a = [18,15,22,25,11,29,31]
  n = len(a)
  
  tmp = a[0]
  for i in a:
     if(a[i] &lt; tmp):
        tmp = a[i]
        print(tmp)
  </code></pre>