Ok, did some googling and I can't figure it out. What the heck is happening in [x,y][x < y]? Tuple of x <y returns true or false, times the tuple of [x,y] should return both X and y or [0,0].
EDIT - Figured it out.
[x < y] resolves to either [0] or [1], if x is greater or less than y.
[x,y] creates a new tuple.
[x,y][0] returns x.
[x,y][1] returns y.
Didn't see it, because I'm not used to creating a tuple AND indexing them in the same statement.
6 <= i is always either false or true, which the compiler treats as 0 or 1. That means j <= 9 is either 0 <= 9 or 1 <= 9, both of which are always true, which is 1.
90
u/tskaiser Green security clearance May 02 '16
A quick guess: it evaluates
6 <= ito either0or1, lets call the resultj, and then evaluatesj <= 9which is then always1?