본문 바로가기

코딩/파이썬

파이썬에서 self와 전역변수 접근


self.str 아니면 동일한 전역 변수에 접근해서 출력함

self는 현재 인스턴스 객체를 가리킨다