How to access variable from one class to another class. Lets say class A has argument given from command line. I want to access the variable of class A give through command line to another class say class B.How to access?
class A():
def __init__(self,var1,var2):
pass
class B():
def __call__(self):
#(here I want to use var1 and var2 from class A)
A(sys.argv[1],sys.argv[2])
def __call__(self):ordef __init__(self):?That's quite a difference.Awas constructed with?A(sys.argv[1],sys.argv[2])is doing?sys.argv[1]andsys.argv[2], so why not just use them again?