I want to create a class variable in python with arguments of the funtion
example :
class test:
def __init__(self):
self.name = "test"
self.age = 20
def get_variable (self, name, age):
# this function should declare a variable which is name_age
self.test_20 = 'some value'
##this self.test_20 will become my flag for the class
## I want declare a variable which is test_20 from name and age argument of this function
t = test()
t.get_variable('test', 20)
#if I call t.test_20, it should return 'some value'
It seems easy but I am not able to get it done any help is appreciated