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

Rachela
Jul 25, 2021

--

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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Rachela
Rachela

Written by Rachela

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

No responses yet

Write a response