title: How to skip to the next input if time is out in python
body: <p>I have a list of inputs such as <code>fruits = [apple, banana, grape, strawberry, orange]</code>.</p>
  
  <p>I have a <code>for</code> loop that iterates over this list and a function to work with each of the elements:</p>
  
  <pre><code>for f in fruits:
      mix(f)
      print "Finish mixing f"
  </code></pre>
  
  <p>My question is how to skip to the next input if the current input is taking too long. For example, mix() is working with apple, but 10 minutes have passed and it didn't get to the print line. I want it to give up on apple and pick up on banana if time is out. How can I do that?</p>