Notice
Recent Posts
Recent Comments
Link
«   2026/08   »
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
Tags
more
Archives
Today
Total
관리 메뉴

Ahzaza

객체와 변수 본문

Python/자료구조

객체와 변수

뿌우앙 2025. 4. 25. 01:21

apple = '사과'

 

1.

node = apple

print(node) = '사과'

 

2.

node = Node(apple)

print(node) = <__main__.Node object at 0x...> 와 같은 사과에 저장된 주소 출력

 

두 node의 차이점

1번 node → 변수

2번 node → 객체