title: Need to restart loop
body: <p>Still a NOOB in Python. Get stuck many times.
  Script runs 3 sequencies, one after the other, each for 20 seconds.
  Each sequence has a while loop. and a time out statement.
  Then it starts the next loop, and so on till the end of end of the 
  3rd loop. Then it quits. I would like to start again from the top.
  I probably have too many while loops.</p>
  
  <pre><code>#!/usr/bin/env python
  
  # Import required libraries
  import time
  # More setup
  
  # Choose a matrix to use
  mat = mat1
  t_end = time.time() + 20
  #Start loop
  while time.time() &lt; t_end:
    # code
    # loop timeout
  
  # 2 more loops follow just like first one, except matrix becomes
  mat = mat2
  mat = mat3
  </code></pre>