Study notes (25): zero-base mastering Python entry to actual combat-class definition object, self points to itself (3)

Learn now: https://edu.csdn.net/course/play/26676/339580?utm_source=blogtoedu

1. Compare methods and functions

2. Understand the characteristics of class methods

3. Understand the characteristics of static methods

The first parameter of the method in the class must be self.

The method cannot be called alone, it must be called through a class or instance.

The function can be used alone.

 

Guess you like

Origin blog.csdn.net/m0_49939521/article/details/109154800