2 ms·
Python does foo if bar else baz, which is a little more verbose but still okay. JS and Perl, however, rock with their boolean operators AND and OR not just eva
by fauigerzigerk 15y ago
Python does foo if bar else baz, which is a little more verbose but still okay. JS and Perl, however, rock with their boolean operators AND and OR not just evaluating to true and false, but to the actual value that was considered true.
Python does that as well:
0 or False or 'Python rocks' or [] == 'Python rocks'