Untitled Post - 71 Posted on 2014-08-18 Edited on 2020-12-04 In GNU/Linux Python的条件表达式或叫三元操作符与其他语言有很大的不同,其格式为: result_while_condition_is_true if condition else result_while_condition_is_false,如果condition为True,整个条件表达式的值为result_while_condition_is_true,否则整个条件表达式的值为result_while_condition_is_false