
📌 클래스 변수(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" # 클래스 변수 ..