What is happening behind the scenes when calling object.method() and Class.method(object)?
问题 I am pretty new to Python and am tackling OOP. I am a bit confused as to when to use calls to methods and classes. The sample code below outputs the average, however I am curious as to when you would use calling from the Class vs methods from a real-world perspective. I'm pretty sure this is just something that I may have yet to tackle, but it's just been a bit of a confusion as to when I would use one over the other. class Student: def __init__(self, new_name, new_grades): self.name = new