Is there any way to do this in python? I.e. have the variable assignment return the assigned value and compare that to an empty string, directly in the while loop. No biggie if it isn't possible, just to used to doing it in php.
while((name = raw_input("Name: ")) != ''):
names.append(name)
What I'm trying to do is identical to this in functionality:
names = []
while(True):
name = raw_input("Name: ")
if (name == ''):
break
names.append(name)