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

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -