摘要: a, b, c = 1, 2, 3 1.常规 if a>b: c = a else: c = b 2.表达式 c = a if a>b else b 3.二维列表 c = [b,a][a>b] 4.传说是源自某个黑客 c = (a>b and [a] or [b])[0] 阅读全文
posted @ 2016-07-29 18:09 loyfee 阅读(255) 评论(0) 推荐(0) 编辑
摘要: from colorama import init,Fore import os,time init(autoreset=True) user_list = {"Gary":["password",8000],"Larry":["password",10000],"Peter":["password",20000]} shops_goods = {"0001":["iPhone ",4800,... 阅读全文
posted @ 2016-07-29 15:43 loyfee 阅读(1541) 评论(0) 推荐(0) 编辑