3 ms·
It's also worth noting that, in Python 2.6 and higher, we DO have a ternary operator: x = 3 if foo() else 6
by noahlt 16y ago
It's also worth noting that, in Python 2.6 and higher, we DO have a ternary operator:
x = 3 if foo() else 6
3 ms·