Q:

How to add iteration numbers

my question is about adding loops in python
I am trying to add iteration numbers like summation of all iteration results
For example
first iteration
a = 10
b = 5
a = a + b = 15
c = a = 15
second iteration
    a = 15
    b = 5
    a = a + b = 20
    c = a1 + a2 = 35

I know to iterate using for loop which is like this

for i in range(2)
    a = 10
    b = 5
    a = a + b

which gives a = 20 
but how to get c which is adding iteration results

A:

a=10
b=5
c=0
for i in range(2):
    a = a + b
    c = c + a

print a
print c

Above one gives results of a and c

