社區,如何將用戶輸入存儲在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