I have kind of stupid question:
Is there any way to use instance variable from one class in another class?
I guess inheritance could be the way to do it, but I don’t know how:(
for example:
class A():
def __init__(self):
self.var1 = 12
self.var2 = C()
def start(self):
self.var1=11
B()
class B():
def doSomething(self):
varXX = " here I would like to have objet self.var2 from A()"
class C():
def makeUI(self):
something
thx for help
1 Answer