我正在尝试将已解析的浮点数与数据库中的浮点数进行匹配。
INFO:root:Sell website: 61.8 - Sell DB: 61.800000
INFO:root:Buy website: 61.35 - Buy DB: 61.350000
INFO:root:Middle website: 61.4905 - Middle DB: 61.490500
这是我的病情,但显然不起作用。
if (sell == row['sell'] and buy == row['buy'] and middle == row['middle']):
logging.info('No change in rate.')
else:
logging.info('New rate found!')
数字相同,除了零...
为什么python不匹配这个?