The ternary operator is used for "expression". The story that break and continue are not "expressions" but "statements", so you can't wear them like the example below.
Bad example
for i in range(100):
break if i > 20 else continue
Recommended Posts