python - Python中的“大约等于”操作数
问题描述
你们知道“大约等于”操作数是什么吗?我需要在列表中找到大约等于我定义的固定数字的数字。我试过做=~
,== ~float
但没有工作。下面是我尝试做的示例代码。提前致谢!
for c1 in range(len(path_Limon_Lib_Chorotega)):
for c2 in range(len(path_Limon_Lib_Chorotega[c1][0])):
if path_Limon_Lib_Chorotega[c1][0][c2] == ~11.264:
# if path_Limon_Lib_Chorotega[c1][0][c2] > 11.264 and path_Limon_Lib_Chorotega[c1][0][c2] < 60.8:
coords_Limon_Lib_Chorotega[c1].append(
(
path_Limon_Lib_Chorotega[c1]["Lat"][c2],
path_Limon_Lib_Chorotega[c1]["Long"][c2]
)
)
解决方案
推荐阅读
- c++ - C++ 双重释放或损坏(出)
- php - PHP mysql Select查询调用超过指定数据
- python - 如何为项目中的所有记录器设置处理程序?
- reactjs - 无法访问 api 调用返回的数据 http://dummy.restapiexample.com/api/v1/employee/3
- java - 使用模式匹配在 Java 中查找没有数字的字符串数据
- linq - Crystal Report - Linq select 语句在字段中查找空值
- c++ - 为什么这个程序的结果是3个“出生”?而4个死
- java - 在创建建议 bean 时,Spring aop 建议无法包装代理
- apache - 重写子目录以查询字符串参数
- python - 用于预测整数输出的自定义损失函数?