标签:python 购物车
product_list=[ (,), (,), (,), (,), (,), (,), ] shopping_list = []salary = ()salary.isdigit():salary =(salary) : index,item (product_list):(index,item) user_choice = () user_choice.isdigit():user_choice =(user_choice)user_choice< (product_list) user_choice >=:p_item =product_list[user_choice]p_item[]<= salary:shopping_list.append(p_item)salary -= p_item[](%(p_item,salary)) : (%salary) : (% user_choice) user_choice ==:() p shopping_list: (p) (,salary) () : ()
标签:python 购物车
原文地址:http://180505.blog.51cto.com/170505/1973840