I have the variable assignment in order to return the assigned value and compare that to an empty string, directly in the while loop.
Here is how I\'m doing it in PH
You can wrap raw_input()
to turn it into a generator:
def wrapper(s):
while True:
result = raw_input(s)
if result = '': break
yield result
names = wrapper('Name:')
which means we're back to square one but with more complex code. So if you need to wrap an existing method, you need to use nosklo's approach.