def pi(times): seq = [] counter = 0 for x in range(times): counter += 2 seq.append(\"((%f**2)/(%f*%f))*\"%(float(counter), float(counter-1),
Why use eval() at all?
eval()
def pi(times): val = 1 counter = 0 for x in range(times) : counter += 2 val *= float(counter)**2/(counter**2 - 1) return val * 2
Does the exact same thing.