title: How to do while loops with multiple conditions
body: <p>I have a while loop in python</p>
  
  <pre><code>condition1=False
  condition1=False
  val = -1
  
  while condition1==False and condition2==False and val==-1:
      val,something1,something2 = getstuff()
  
      if something1==10:
          condition1 = True
  
      if something2==20:
          condition2 = True
  
  '
  '
  </code></pre>
  
  <p>I want to break out of the loop when all these conditions are true, the code above does not work</p>
  
  <p>I originally had </p>
  
  <pre><code>while True:
        if condition1==True and condition2==True and val!=-1:
           break
  </code></pre>
  
  <p>which works ok, is this the best way to do this?</p>
  
  <p>Thanks</p>