G-010_Class_Instance.py
0.00MB
Class | Instance | |
Definition | Blueprint for creating objects | An individual object created from a class |
Attributes | Defines attributes | Contains data specific to the instance |
Methods | Defines methods | Can use the class-defined methods |
Example | class Dog: | my_dog = Dog("Buddy", 3) |
Usage | Used to define structure and behavior | Used to create objects that follow the class blueprint |
'Python' 카테고리의 다른 글
Python_N-002. random module (0) | 2025.01.18 |
---|---|
Python_N-001. basic commend in Numpy (0) | 2025.01.18 |
Python_G-009. import vs from ... import vs from... import * (0) | 2025.01.17 |
Python_G-008. Function (0) | 2025.01.16 |
Python_G-007. List vs Tuple vs set vs dictionary (0) | 2025.01.16 |