3. Methods in python
- Function
- Function is block of code that is also called by its name(
independent) - Function does not deal with Class and its instance concept.
- Function is block of code that is also called by its name(
- Methods
- Method is called by its name, but it is
associated to an object(dependent)
- Method is called by its name, but it is
The following are various types of allowed methods:
- Instance Methods - - self
- Class Methods - - cls
- Static Methods