패키지
: 관련 있는 모듈을 하나의 폴더로 구성해놓은 것을 말한다.
# 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] 문자열 다루기 (0) | 2022.06.06 |
---|---|
[Python] 소수점 관리하기 (0) | 2022.06.04 |
[Python] 모듈 (0) | 2022.06.04 |
[Python] 클래스 변수 (0) | 2022.06.04 |
[Python] 상속 (0) | 2022.06.02 |