sys.modules 와 sys.path의 차이점을 서술해 주세요.
sys 도 import 해야하는 모듈입니다. 파이썬은 sys 모듈의 위치를 어떻게 찾을 수 있을까요?
Absolute path와 relative path의 차이점을 서술해 주세요.
calculator 패키지 만들기
참고 자료: Python Tutorial for Beginners 9: Import Modules and Exploring The Standard Library
파이썬은 패키지와 모듈로 효율적으로 관리할 수 있다.
우리가 module 을 import 할때 경로를 찾는다. 그리고 그 경로는 sys.path 라는 list 에 저장되어있다.
import sys
print(sys.path)
['현재 디렉토리' ...]
#디렉토리 리스트 형태로 나타난다.