class A:
def __init__(self):
self.name="XYZ"
def collect_data(self):
b=B.age
print(b)
class B:
age=9
objectA=A()
objectA.collect_data()
Please tell me if this the correct way of accessing the static variable present in class "B" from class "A" . Also I would like to know had there been a static method in class "B" , would I be able to access that in any way from class A .