title: modifying iterator in for loop in python
body: <blockquote>
    <p>@ Padraic Cunningham Let me know if you want me to delete the
    question.</p>
  </blockquote>
  
  <p>I am new to python. I want to skip some iterator values based on some condition. This is easy in C but in python I am having a hard time.</p>
  
  <p>So please help me in understanding why the code here loops 100 times instead of 10.</p>
  
  <pre><code> for i in range(100):
      print i
      i = i +10
  </code></pre>
  
  <p><strong>edit</strong>: I understand there is option to change step size of for loop. But I am interested in dynamically changing the iterator variable, like we can do in C. Okay, i get it, for loop is different in python than in C. Easy way to do is use the while loop, I did that in my code and it worked. Thank you community!</p>