代码示例:(标识:python_booleans_4)
python_booleans_4.py
x = "Hello"
y = 10

print(bool(x))
print(bool(y))
运行结果: