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