Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)
Can anyone tell me, In simpler words, what does the term "method" in python means?

1 Answer

0 votes
by (26.4k points)

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")

Are you pretty much interested to learn python in detail? Come and join the python training course to gain more knowledge.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Oct 27, 2019 in Java by Shubham (3.9k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...