首页 > 代码库 > 按照老男孩的讲师做的为什么是死循环那?

按照老男孩的讲师做的为什么是死循环那?

salary=input("input you salary:")
if salary.isdigit():
salary=int(salary)
else:
exit("invaild data type...")

welcome=‘welcom to alex shopping more‘.center(50,‘-‘)
print(welcome)

exit_flag=False
product_list = [
(‘iphone‘,5888),
(‘mac air‘,8000),
(‘Xiao mi‘,1999),
(‘coffee‘,30),
(‘tesla‘,820000),
(‘bike‘,800),
(‘cloth‘,200),]
while exit_flag is not True:
print(‘product_list‘.center(50,‘-‘))
for item in enumerate(product_list):
index=item[0]
p_name=item[1][0]
p_price=item[1][1]
print(index,p_name,p_price,)

print("what do you choice:")

按照老男孩的讲师做的为什么是死循环那?