In object-oriented programming, amethodis a function that is associated with an object (or its class) and is called using the dot operator. In Python, everything is an object, and many operations are provided through methods. For example, "hello".upper() calls the upper method of a str object, and [1, 2, 3].append(4) calls the append method of a list object. Textbooks emphasize that methods operate on an object’s internal state and typically receive the object itself as an implicit first argument (commonly named self in class definitions). This is what distinguishes methods from standalone functions.
Modules, scripts, and libraries are different organizational concepts. Amoduleis a file containing Python code, including function and class definitions. Ascriptis a Python program intended to be run directly. Alibraryis a collection of modules that provides reusable functionality. None of these terms specifically mean “functions that belong to objects.”
Understanding methods matters because it connects to encapsulation and abstraction: objects provide behaviors (methods) that manipulate their data in well-defined ways. This design enables clearer APIs and supports polymorphism, where different object types can expose methods with the same name but different implementations. In Python, method calls are central to working with built-in types (strings, lists, dictionaries) and with user-defined classes, making “methods” the correct term for functions that belong to specific objects.