python - 布尔输入和输出问题
问题描述
x = bool(input())
print(x)
输入:假
输出:真
为什么输出总是True
与输入无关?
解决方案
推荐阅读
- python - 导入多个 CSV 文件时,按顶部单元格过滤要导入的行
- python - Python将键具有多个值的字典转换为元组列表
- sql-server - WHERE NOT IN 的子查询未按预期过滤数据
- reactjs - 打字稿 | Typescript 在 IProps 上扩展 formikProps 时缺少 27 个 Props
- angular - 查看未随着对象属性的更改而更新
- javascript - 如何在不相关的组件之间共享数据?角 6
- python - 如何在 Python 代码中的函数中获取今天的日期部分?
- sql - 为什么 MS SQL Server 使用“LIKE”查询返回结果但使用“=”返回空集
- ffmpeg - 如何使用ffmpeg从0开始按顺序编号/命名文件?
- xcode - App Store Connect 操作错误:无法连接到 Apple 的网络服务