1. 导入python 模块的基本方式
2. 为导入的python 模块指定别名
import math
from math import cos, tan
from math import *
print(math.sin(1.23))
print(cos(2.34))
print(tanh(1.23))
# 指定别名 as
# 一旦指定了别名,原来的名字就不能用了
import math as mt
print(mt.sin(2))
from math import cos as cs
print(cs(3))
0.9424888019316975
-0.695563326462902
0.8425793256589296
0.9092974268256817
-0.9899924966004454
正文完