2 ms·
In Python, bool is a subclass of int. The constants True and False have the values 1 and 0 respectively, and it's legal to do arithmetic with them :)
by ubernostrum 14y ago
In Python, bool is a subclass of int. The constants True and False have the values 1 and 0 respectively, and it's legal to do arithmetic with them :)