what is the difference between methods and functions in Python

theritically, i want to know the differences

  • Rama
  • 15 Aug
  • 1502 Views
  • 37 Answers
Your Answer

In Python, both functions and methods are used to perform specific tasks, but they differ in how they are defined and used. A function is a block of code that is defined independently and can be called anywhere in the program. It is not associated with any object and works on the data passed to it as arguments.

Python

Didn't get the answer.
Contact people of Talent-Python directly by clicking here