【发布时间】:2017-12-11 08:39:08
【问题描述】:
end = False
numbers = []
while not end:
i =(raw_input(" Enter the number(0 to end the input)"))
if i ==0:
end = True
else:
numbers.append(i)
print numbers
即使用户输入的输入为0,列表也不退出
【问题讨论】:
标签: python python-2.7 input type-conversion