short if python

38

x = 10 if a > b else 11
# Traditional Ternary Operatorcan_vote = (age >= 18) true : false;# Python Ternary Operatorcan_vote = True if age >= 18 else False

Comments

Submit
0 Comments