I have a lot of variables. Say for example, I wanted to print each variable everytime it was computed with. How would I do this. I will illustrate below:
def mul(a,b):
return a*b
a = mul(1,2)
b = mul(1,3)
c = mul(1,4)
b = mul(1,5)
How would I print so it displays both computations of b, as shown below:
a = 2
b = 3
c = 4
b = 5
Would I have to store the variables in a list and use a for loop? Quite new to python so I am unsure.