title: Reset array position in for loop
body: <p>I want to reset the array index position after reaching its last index in a For cycle in python.</p>
  <h3>Example:</h3>
  <pre><code># Array 1
  a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]
  # string
  string1 = &quot;hello world here i am bla bla bla bla bla&quot;
  b = []
  
  # --------------------------------------------------------------------
  # Here I'm adding to a new array the odd of each letter in the string:
  
  for each in string1:
      pass
      b.append(ord(each))
  
  # --------------------------------------------------------------------
  # Now I'm trying to subtract to each odd the number in the `b` array, 
  # the value of the number in the same position of the `a` array.
  
  c = []
  x = 0
  for number in b:
      pass
      c.append(b.index[x] - a.index[x])
      x = x + 1
  </code></pre>
  <p>The problem here is that I'll receive an <code>indexError</code> saying that <code>'a' list is out of range</code>.</p>
  <p>That append because a list has 23 objects, and the b list has 41.
  How do I reset the a index count to 0 when it reaches its last item, so the 24th letter will be 1 again and the 25th letter be 2 and so on.</p>
  <p>I don't want to continue the array index, I want to reset it to the 1st index.</p>