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) () : ()
本文出自 “13243290” 博客,谢绝转载!
原文:http://13253290.blog.51cto.com/13243290/1972121
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!