+ 1
why there is method and function in python. what a difference from both of them. I do not understand.
8 Answers
+ 4
methods belong to classes, functions live out in the open.
+ 2
They're are basically the same thing but when you hear someone reference a method, you know that it directly relates to an object or a class, where as a function is just a function somewhere in the code but not directly related to an object or class.
+ 1
and thank you for the others. đ¶
+ 1
a function is a statement that relates an input to just one output
a method is the process to get that output
0
@Michelle wow you always know what some people do not know. thanks for your answer.