摘要: 字符编码 encode、decode 阅读全文
posted @ 2018-03-17 12:09 Lief_1997 阅读(119) 评论(0) 推荐(0)
摘要: 集合的所有操作 1 # 集合的所有操作 2 3 list_1 = [1, 2, 3, 4, 5, 6] 4 list_2 = [3, 4, 5, 6, 7, 8] 5 6 list_1 = set(list_1) 7 list_2 = set(list_2) 8 9 print(list_1, list_2) 10 # 取并集 11 print(list_1 | lis... 阅读全文
posted @ 2018-03-17 12:08 Lief_1997 阅读(192) 评论(0) 推荐(0)
摘要: 1 #购物车程序 2 3 salary=input("请输入你本月的工资: ") 4 if salary.isdigit(): 5 salary = int(salary) 6 goods=['Coco(12 yuan)','Sprite(13 yuan)','Notebook(5 yuan)','iPhone(8888 yuan)','Earphone(... 阅读全文
posted @ 2018-03-17 12:05 Lief_1997 阅读(198) 评论(0) 推荐(0)