Python的三元运算写法:
is_true = True
result = 'TRUE' if is_true else 'FALSE'
# output: TRUE
Swift的三元运算写法:
isTrue = true
result = isTrue ? "TRUE" : "FALSE"
// output: TRUE
标签:运算,Python,Swift,true,三元,TRUE
From: https://www.cnblogs.com/wonderhoi/p/17611745.html