python - while with raw_input creating an infinite loop -
in these lines:
foo = [] = foo.append(raw_input('type anything.\n')) b = raw_input('another questions? y/n\n') while b != 'n': b = foo.append(raw_input('type , continue, n stop\n')) if b == 'n': break print foo how loop break? thanks!
list.append returns none.
a = raw_input('type anything.\n') foo = [a] b = raw_input('another questions? y/n\n') while b != 'n': b = raw_input('type , continue, n stop\n') if b == 'n': break foo.append(b)
Comments
Post a Comment