python中的bool型数据属于int的子类,即True == 1,False ==0。
True is 1#返回False
True == 0#返回True
同时与c语言不同,条件判断语句可以同时判断1<2<3,但是c语言得1<2 && 2<3
python中的bool型数据属于int的子类,即True == 1,False ==0。
True is 1#返回False
True == 0#返回True
同时与c语言不同,条件判断语句可以同时判断1<2<3,但是c语言得1<2 && 2<3