title: How would I put an if statement inside a function?
body: <p>I am very very new to Python and before this I only used extremely simple "programming" languages with labels and gotos. I am trying to make this code work in Sikuli:</p>
  
  <p><a href="http://i.imgur.com/gbtdMZF.png" rel="nofollow">http://i.imgur.com/gbtdMZF.png</a></p>
  
  <p>Basically I want it to loop the <code>if</code> statement until any of the images is found, and if one of them is found, it executes the right function and starts looping again until it detects a new command.</p>
  
  <p>I have been looking for tutorials and documentation, but I'm really lost. I think my mind is too busy trying to go from a goto/label to an organized programming language.</p>
  
  <p>If someone could give me an example, I would appreciate it a lot!</p>