class A:
def __init__(self):
self.num= [0]
def b(self):
print("Don't Run")
self.num= [2]
obj = A()
obj.b()
print(obj.num)
>> Don't Run
>> [2]
Here I have a class and I want to access the instance variable self.num on function b. How can I access the variable without running the print("Don't Run").