I try to repeat the function if certain criteria are not met. For instance:
def test(): print "Hello", x = raw_input() if x in '0123456789': return x test()
In this program, if you enter the number for the first time, it will return the number. If you type a non-number, it will be repeated as desired. However, if you type a few non-numbers, and then a number, it will not return anything. Why is this so?
source share