A lot of simplification and reduction. Not too complicated. Nice and short. Runs fast.
#Euler71 class Problem71: def __init__(self, limit): self.limit = limit def Solution(self): min = 0 min_n = 0 for n in range (int(min*self.limit), int(self.limit*float(3)/7)): f = float(n)/self.limit if f < float(3)/7: if f > min: min = f min_n = n return "Answer:"+str(min_n) if __name__ == '__main__': P = Problem71(1000000) print P.Solution()