1

I am trying to match floats that are parsed, with floats from my DB.

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

This is my condition, but it clearly doesn't work.

if (sell == row['sell'] and buy == row['buy'] and middle == row['middle']):
    logging.info('No change in rate.')
else:
    logging.info('New rate found!')

The numbers are the same, except for the zeros...

Why is python not matching this?

Nikk
  • 7,384
  • 8
  • 44
  • 90

0 Answers0