代码示例:(标识:python_booleans_5)
python_booleans_5.py
print(bool("abc"))
print(bool(123))
print(bool(["apple", "cherry", "banana"]))
运行结果: