3 ms·
This isn't the Python ternary which is: varX = 'X' if boolean else 'Y' # And is chainable in a more natural way than C*: varX = 'X' if boolean else 'Y'
by kevin_thibedeau 10y ago
This isn't the Python ternary which is:
varX = 'X' if boolean else 'Y'
# And is chainable in a more natural way than C*:
varX = 'X' if boolean else 'Y' if other else 'Z'