How can I use a 'for' loop for just one variable in a function which depends on two variables?

Viewed 2210

I just want to use the for loop for the t variable in my function:

l = []

def func(s):   
    for i in range(1, 100):
        t = i
        p = t * 2 + s * 2
    return p

l.append(func(10))

print l

I want the value of t to go from 1 to 99 and and print a list of all the value, but I always end up getting l = [218].

3 Answers
Related