Nov-29-2017, 01:23 AM
I was wondering how the self.data attribute gets into the display method from the setdata method .Thank You
class FirstClass: def setdata(self, value): self.data = value def display(self): print(self.data) obj = FirstClass() obj.setdata(10) obj.display()