Python 打印布尔变量:True 或 False
在 Python 中,可以使用 `print` 函数来输出变量的值。要输出 True 或 False 的变量,可以直接将变量作为 `print` 函数的参数,例如: ```python x = True y = False
print(x) print(y) ``` 输出结果为: ``` True False ```
原文地址: https://www.cveoy.top/t/topic/p5my 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
在 Python 中,可以使用 `print` 函数来输出变量的值。要输出 True 或 False 的变量,可以直接将变量作为 `print` 函数的参数,例如: ```python x = True y = False
print(x) print(y) ``` 输出结果为: ``` True False ```
原文地址: https://www.cveoy.top/t/topic/p5my 著作权归作者所有。请勿转载和采集!