Skip to content

Commit 836d460

Browse files
authored
[전희선] 8주차 미션 제출 (#79)
1 parent 0e2040c commit 836d460

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

8th_members/전희선/8주차.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
- 라이브러리(requests) import 후 참조 카운트 변화 확인
2+
```python
3+
>>> import sys
4+
>>> for i in range(1, 4):
5+
... print(f"{i}: {sys.getrefcount(i)}")
6+
...
7+
1: 146
8+
2: 110
9+
3: 50
10+
>>> import requests
11+
>>> for i in range(1, 4):
12+
... print(f"{i}: {sys.getrefcount(i)}")
13+
...
14+
1: 1063
15+
2: 444
16+
3: 244
17+
```
18+
<img width="322" alt="image" src="https://github.com/heehehe/CPython-Guide/assets/41580746/f0135817-e2d8-4215-a79c-2a37a0ff4798">

0 commit comments

Comments
 (0)