4 ms·
Yeah, this also evaluates to [15] and is easier to understand what's going on: [15or x in (1, 2, 3)] As another person pointed out, Python's lexer sees 0x
by takeda 6y ago
Yeah, this also evaluates to [15] and is easier to understand what's going on:
[15or x in (1, 2, 3)]
As another person pointed out, Python's lexer sees 0xfor (or 15or) and splits it into "0xf", "or" ("15", "or" for the other case) then parser processes it as usual.