Revision history [back]

Printing variable name

How would I return a variable name in a function. E.g. If I have the function:

def mul(a,b):
return a*b

a = mul(1,2); a
b = mul(1,3); b
c = mul(1,4); c


This would return:

2
3
4


I would like it to return:

a = 2
b = 3
c = 4


How would I do this?