Hello,
I am trying to pass a variable from a function to a class. Example code is below:
def hello(var):
return var
class test():
def __init__(self):
pass
def value(self):
print var
hello(var)
test = test()
test.value()
I would like to pass var
into the class test()
.
Thanks for any help.