import는 모듈을 가져올 때 사용한다.

예시

import math
# sqrt()는 제곱근을 구해준다.
print(math.sqrt(81))

# help메소드를 사용하면 import한 라이브러리의 document를 볼 수 있다.
help(math)

# math 라이브러리의 factorial 메소드 사용
print(math.factorial(5))

# factorial 메소드만 import해서 사용할 수 있다.
from math import factorial
print(factorial(5))

# 메소드를 import할 때 별칭을 줄 수 있다.
from math import factorial as fac
print(fac(5))