by qsort · 4y ago · 0 comments
>>> True + True 2 >>> True * 13 + (1 - False) * 17 30
(The same happens in R, for what it's worth. as.integer(TRUE) is one and as.integer(FALSE) is zero and the operations you wrote work just he same.)