社区,如何将用户输入存储在while循环中? (python)
我是一个关于python的总noob,我想用程序创建一个名称统计。 我的代码(我使用Python 3.4.0):
while True:
eingabe = input ('Please enter a name: ')
print (eingabe)
if eingabe == '':
break
所以现在我想用户输入存储在列表中。我怎样才能做到这一点?
亲切的问候, 丽莎
http://docs.python.org/2/tutorial/datastructures.html – smassey
http://stackoverflow.com/questions/8114355/loop-until-a-specific-user-input – adam