반응형
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 |
Tags
- socketio
- 티스토리챌린지
- 맛집
- TTS
- python
- Torch
- linux
- 오블완
- error
- 터미널
- timm
- ROS2
- 스팸
- GPT
- ros
- string
- 판교
- 분당맛집
- humble
- opencv
- ubuntu
- 딥러닝
- pytorch
- no space left on device
- openAI
- CLASS
- CUDA
- tensorflow
- Android
- ChatGPT
Archives
- Today
- Total
목록서브클래스 (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