[Python] 패키지
패키지 : 관련 있는 모듈을 하나의 폴더로 구성해놓은 것을 말한다. # 1. import 패키지.모듈 import unit.character unit.character.test() # 2. from 패키지 import 모듈 from unit import item item.test() # 3. import 패키지 import * from unit import * character.test() item.test() monster.test() # 4. import 패키지 import unit unit.character.test() unit.monster.test() unit.item.test()
Python
2022. 6. 4. 16:37