x=10 y=5 if x>y: print(x) else: print(y) """三元运算符""" # 为真时的结果 if 返回布尔值的判断条件 else:为假的结果 print(x if x>y else y) print({True:x,False:y}[x>y])