1 2 3 4 5 6 7 8 9 10 11 12 13
def run(): acc = [] for x in range(1, 10001): acc = acc + [x * x] # immutable append, like funct's push out = [] for v in acc: if v % 2 == 0: out = out + [v] total = 0 for v in out: total += v return total print(run())