title: Python: how to check a condition in a nested loop?
body: <p>I have a program like this one:</p>
  
  <pre><code>one_tuple = ((0, 1, 2),
               (3, 4, 5),
               (6, 7, 8),
               (0, 3, 6),
               (1, 4, 7),
               (2, 5, 8),
               (0, 4, 8),
               (2, 4, 6))
  def function():
      for tuples in one_tuple:
          for variables in tuple:
             see if ceratin conditions are true....
  </code></pre>
  
  <p><em>this is  an artificial intelligence for a program called "Tic tac toe" and this part checks every winning combination, nested for loops seemed like the easiest solution for that (that's why sub tuples have 3 elements) and I need to go through each element and check them (for example if a sub tuple has 2 noughts or 2 crosses and 1 empty field then it needs to append that field to a list, in my example the program will never know if someone can win by taking that empty field)</em></p>