Moo Note

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

pythonprivate 1

[Python] 클래스와 변수 + 접근지정자 getter, setter

📌 클래스 변수(Class Variable)와 인스턴스 변수(Instance Variable)클래스 변수 : 클래스가 공유하는 변수 (모든 객체가 같은 값을 가짐)인스턴스 변수 : 객체마다 독립적으로 가지는 변수class Person: # 클래스 변수 species = "Human" def __init__(self, alias): # 인스턴스 변수 self.alias = namep = Person("Tom")print(Person.species) #Human (클래스 변수) print(p.species) # Human (클래스 변수)print(p.alias) # Tom (인스턴스 변수)Person.species = "Changed" # 클래스 변수 ..

AI/Python 2025.10.01
1
더보기
프로필사진

Android iOS Swift Objective C Xcode

  • 분류 전체보기 (118) N
    • AI (11) N
      • AI TECH (2) N
      • Python (8) N
    • iOS (24)
    • Android Studio (48)
    • SQLD자격증독학 (28)

Tag

xcode, SSH, witkorea, 위트에디터, swiftUI, 댕냥위트, ios, Swift, sqlite, DB, 플레이데이터, 위트콘텐츠에디터, 단지개, 위트, ios13, skn, wit, AICamp, wit콘텐츠에디터, 위트코리아,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/10   »
일 월 화 수 목 금 토
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 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바