题解 | #判断布尔值#
判断布尔值
https://www.nowcoder.com/practice/b8c8a1c5f57b4724a1cbc12eb50378a5
a = bool(int(input())) if a == True: print('Hello World!') else: print('Erros!')
Attention: If you directly use the bool function to convert the input, there will be problems, because the input is a string, and the bool will always be True. So you need to go through `int()` first