Home »
MCQs »
Python MCQs
A method refers to a function which is part of a class?
58. A method refers to a function which is part of a class?
- True
- False
Answer: A) True
Explanation:
A method is a function that is a part of a class that has been defined. It is accessed through the use of an instance or object of the class. A function, on the other hand, is not restricted in this way: it simply refers to a standalone function. This implies that all methods are functions, but that not all functions are methods in the same sense.