3 ms·
When condition() is truthy, the first evaluates to True and the second evaluates to [] Try it out. https://ideone.com/GciAs8 https://ideone.com/GciAs8
by klyrs 5y ago
When condition() is truthy, the first evaluates to True and the second evaluates to []
Try it out. https://ideone.com/GciAs8 https://ideone.com/GciAs8
- hatmatrix 5y agoSo the problem is not in condition() but in the the other statement/expression. Similarly, True and False or 5 returns 5 rather than False.