title: Set variable in loop condition
body: <p>In Java, I can set a variable in a loop condition as such</p>
  
  <pre><code>String s;
  
  while ((s=myFunction())!=null){
      System.out.println("It's there jim. "+s);
  }
  </code></pre>
  
  <p>In this example, s would be set to whatever the result of myFunction() was. In Python, I know I can do it as</p>
  
  <pre><code>s = myFunction()
  while s!=None:
     print "It's there jim",s
     s = myFunction()
  </code></pre>
  
  <p>but I would like to avoid doing this. Is there a way I can do the above Java code in Python?</p>