擅长:python、mysql、java
<p>您可以使用减法和绝对值函数确定两个值之间的距离是否在1.0以内:</p>
<pre><code>count = 0
for row in data:
count++
if (abs(row[2] - row[3]) <= 1.0):
print('The values in row {0} are {1} and {2}, and are within 1.0 of each other.'.format(count, row[2], row[3]))
</code></pre>