title: How do I loop through a list by twos?
body: <p>I want to loop through a Python list and process 2 list items at a time. Something like this in another language:</p>
  
  <pre><code>for(int i = 0; i &lt; list.length(); i+=2)
  {
     // do something with list[i] and list[i + 1]
  }
  </code></pre>
  
  <p>What's the best way to accomplish this?</p>