摘要: 用for循环输出商品名单,其中用了enumerate函数对列表进行格式化输出 please input your salary:11 > ('iphone11', 5800)2 > ('mac book ', 9000)3 > ('coffee ', 38)4 > ('python book', 8 阅读全文
posted @ 2019-10-25 19:45 Stary_tx 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 嵌套列表实现购物车项目 please input your salary:5880购物清单如下 购物清单 1.iphone11 58002.mac book 90003.coffee 384.python book 805,bicycle 1200 请输入你要购买的商品编号:1该商品已加入购物车,当 阅读全文
posted @ 2019-10-25 17:21 Stary_tx 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 购物程序 please input your salary:6000购物清单如下 购物清单 1.iphone11 58002.mac book 90003.coffee 384.python book 805,bicycle 1200 请输入你要购买的商品编号:1该商品已加入购物车,当前余额为200 阅读全文
posted @ 2019-10-25 10:02 Stary_tx 阅读(205) 评论(0) 推荐(0) 编辑