#! /usr/local/bin/python3 from fractions import Fraction def drange(start, stop, step): start = Fraction(str(start)) step = Fraction(str(step)) while start < stop: yield float(start) start += step print(list(drange(17.8, 20, 0.1)))