Revising the Difference between Methods and Functions
What's the difference between a function and a method?
In python everything is an object A method
gets invoked on a given Object
A function
does not get invoked on a given Object, it exists on it's own
A function cannot be invoked before it was defined:
What is OOP?
It is a way to organize the code better rather than keeping everything in one file
Dumping everything in a single file would be very difficult to manage, so OOP allows you to keep a structure and a logical narative
OOP allows us to re-use code that we have already written
Break things into chunks and using multiple files
Last updated