Python goes even further beyond.
>>> True + True
2
>>> True * 13 + (1 - False) * 17
30 >>> 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.)