三元表达式 if else可以使用三元表达式简写 如: if-else age = 18 if age<18: v = '未成年人' else: v = '成年人' 三元表达式: v = '未成年人' if age < 18 else '成年人'