title: Python: Variable step length in a for loop
body: <p>I want to take step value in a for loop from an array. some thing like,</p>
  
  <pre><code>step = [0,1,2,15,3,87] #values in no order  
  for i in range(0, len(raw_pkt), step):
  </code></pre>
  
  <p>The step value should be updated in each iteration. Is there any workaround for that? I know that <code>range()</code> expects an integer value not a list. But I want to take values from the list on each iteration.</p>