반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Android
- no space left on device
- TTS
- 스팸
- pytorch
- 딥러닝
- 터미널
- linux
- 오블완
- CLASS
- Torch
- python
- humble
- openAI
- 맛집
- 판교
- ChatGPT
- 분당맛집
- socketio
- 티스토리챌린지
- ubuntu
- GPT
- ROS2
- error
- timm
- ros
- string
- CUDA
- tensorflow
- opencv
Archives
- Today
- Total
목록subclass (1)
RoBoLoG
[Python] 클래스와 서브클래스
클래스와 서브클래스 알아보기 파이썬에서 클래스와 서브클래스를 사용하는 것은 객체 지향 프로그래밍의 핵심 개념 중 하나입니다. 클래스는 객체의 청사진(blueprint)을 제공하며, 서브클래스는 부모 클래스로부터 속성과 메소드를 상속받아 확장하거나 수정할 수 있습니다. 다음은 파이썬에서 클래스와 서브클래스를 정의하고 사용하는 예시입니다: 기본 클래스: Vehicle class Vehicle: def __init__(self, brand, model): self.brand = brand self.model = model def display_info(self): return f"Brand: {self.brand}, Model: {self.model}" Vehicle 클래스는 차량의 기본적인 속성인 brand..
Study/Python
2024. 1. 5. 10:10