Modern Programming
Modern Programming


Modern Programming
You're viewing a single thread.
print( ["even", "odd"][num % 2] )
If you need to avoid evaluating the wrong branch:
print( [lambda: "even", lambda: "odd"][num % 2]() )
Cursed
Not as cursed as
python
print("eovdedn"[n%2::2])
Indeed