title: How can I restart a list once StopIteration exception is thrown or a certain point in list is reached?
body: <p>I am trying to have a list restart itself from the beginning, once StopIteration exception is thrown or a certain point is reached but I'm having no luck.</p>
  <p>Examples Below:</p>
  <pre><code>my_list = [&quot;Test Subject 1&quot;, &quot;Test Subject 2&quot;,&quot;Test Subject 3&quot;,&quot;Test Subject 4&quot;]
  
  my_lists = iter(my_list)
  
  while True:
      print (next(my_lists))
      
      continue
  </code></pre>
  <p>Prints:
  Test Subject 1
  Test Subject 2
  Test Subject 3
  Test Subject 4</p>
  <p>However, I would like for this program to loop forever, until I stop it myself, each time returning to the first subject in the list.</p>
  <p>I have tried the below to no avail:</p>
  <pre><code>my_list = [&quot;Test Subject 1&quot;, &quot;Test Subject 2&quot;,&quot;Test Subject 3&quot;,&quot;Test Subject 4&quot;]
  
  my_ListIter = iter(my_list)
  
  while True:
      print(next(my_ListIter))
      if my_ListIter := (my_list[3]):
          my_ListIter = (my_list[0])
      continue
  </code></pre>
  <p>In a nutshell, once the script has gotten to the last point in the list or thrown the StopIteration exception, I want it to return to <code>my_list[0]</code> and start over again.</p>
  <p>Is this possible?</p>
  <p>Thanks a lot in advance for any help.</p>