title: Python: Best way to frame a loop with 2 alternating tasks
body: <p>I have a list of items that I need to process. Easy enough: just a simple <code>for x in list</code>.</p>
  
  <p>However, the commands inside the for loop need to be slightly different, on an alternating basis. So <br/><code>n = 0</code> is handled one way, then <code>n = 1</code> a different way; then <code>n = 2</code> the same as <code>n = 0</code>. Note that <code>n</code> and <code>x</code> are different!</p>
  
  <p>At the moment, the only way I can think of doing this is with an incremental counter and if statements. I'm presuming there's an easier way? </p>
  
  <p>Hope this makes sense. Thanks</p>