以下是最简单,最基础的购物车代码,一起学习,一起参考.product_list = [ ('Iphone',5800), ('Mac Pro',15800), ('car',580000), ('coffee',33), ('bike',800), ('book',80),]shopping_list = []salary = input('请输入您的月薪:')if salary.isdigit():#判断用户输入的是否是数字 salary = int(salary)#如果是,用int把它转化一