Back
It's actually a function, which is a member of a class. Look at the below code:
class C: def my_method(self): print("I am a C")c = C()c.my_method() # Prints("I am a C")
class C:
def my_method(self):
print("I am a C")
c = C()
c.my_method() # Prints("I am a C")
Are you pretty much interested to learn python in detail? Come and join the python training course to gain more knowledge.
31k questions
32.8k answers
501 comments
693 users