title: Using multiple variables in a for loop in Python
body: <p>I am trying to get a deeper understanding to how <code>for</code> loops for different data types in Python. The simplest way of using a for loop an iterating over an array is as </p>
  
  <pre><code>for i in range(len(array)):
      do_something(array[i])
  </code></pre>
  
  <p>I also know that I can </p>
  
  <pre><code>for i in array:
      do_something(i)
  </code></pre>
  
  <p>What I would like to know is what this does</p>
  
  <pre><code>for i, j in range(len(array)):
      # What is i and j here?
  </code></pre>
  
  <p>or </p>
  
  <pre><code>for i, j in array:
      # What is i and j in this case?
  </code></pre>
  
  <p>And what happens if I try using this same idea with <code>dict</code>ionaries or <code>tuples</code>?</p>