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