title: Pythonic way to find maximum value and its index in a list?
body: <p>If I want the maximum value in a list, I can just write <code>max(List)</code>, but what if I also need the index of the maximum value?</p>
  
  <p>I can write something like this:</p>
  
  <pre><code>maximum=0
  for i,value in enumerate(List):
      if value&gt;maximum:
          maximum=value
          index=i
  </code></pre>
  
  <p>But it looks tedious to me.</p>
  
  <p>And if I write:</p>
  
  <pre><code>List.index(max(List))
  </code></pre>
  
  <p>Then it will iterate the list twice.</p>
  
  <p>Is there a better way?</p>