题解 | #判断布尔值#
判断布尔值
https://www.nowcoder.com/practice/b8c8a1c5f57b4724a1cbc12eb50378a5
bool1 = int(input())
if bool1: print("Hello World!")
if not bool1: print("Erros!")
在python中将返回值为大于0的值判断为True,返回值为0的值判断为False判断布尔值
https://www.nowcoder.com/practice/b8c8a1c5f57b4724a1cbc12eb50378a5
bool1 = int(input())
if bool1: print("Hello World!")
if not bool1: print("Erros!")
在python中将返回值为大于0的值判断为True,返回值为0的值判断为False相关推荐