if-else是一种判断语句,但在python中有一种方式是使用if实现三目运算,如:
max = a if a>b else b
这句代码表达的操作是:如果a > b 则max =a 否则 max = b