说明:废话不多说,直接上代码
#Author:Lancy Wu
product_list=[
('Iphone',5800),
('Mac Pro',9800),
('Bike', 800),
('Watch', 10600),
('Coffee', 31),
('Lancy Python', 120)
] #商品列表
shopping_list=[] #定义一个列表来存储已购商品
salary=input("请输入工资:")
if salary.isdigit(): #当输入的内容为数
<weixin_38550834> 上传 | 大小:44kb