摘要: 三元表达式 在以前,在诸如比较两个数大小的时候,通常的写法都是下面的样子 if x y: print("the max is x") else: print("the max is y") 三元表达式的语法为: True if expression else False 现在可以个体三元表达式来完成 阅读全文
posted @ 2018-03-24 23:13 renpingsheng 阅读(871) 评论(0) 推荐(1) 编辑