theritically, i want to know the differences
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.