Python: Difference Between a Function and a Method (Non-technical definition)

The only difference is the location within your code: a method is a function located inside a class.

As a new programmer, I like to think about these definitions in terms of how techniques are used most of the time — with the assumption that there may be some circumstances where there is a difference, but in practical terms it’s not important.

Take a look here if you would like a technical definition about the difference between a function and method more generally in object oriented programming: https://stackoverflow.com/questions/155609/whats-the-difference-between-a-method-and-a-function#155655

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rachela

Rachela

19 Followers

I am a librarian and new computer programmer creating an app with Python and Kivy to document the plants in my garden.