>>> class test():
... def add(self):
... a = 3+5
... b = 4+9
... return a,b
...
>>> x = test()
>>> x.add()
(8, 13)
>>> z = x.add()
>>> z[0]
8
>>> z[1]
13
I looking for way to read individual variable like value of a and b using variable name not z[0] or z[1].
I am also trying to avoid using global variables.
Simply assign like this
Now,
awill have 8 andbwill have 13