方法1
>>> import math
>>> math.cos(1)
0.5403023058681398
0.5403023058681398
方法2
>>> from math import*
运行后,调用函数不用再加math前缀,但如果函数与math模块
中某个函数同名,将被math模块中的同名函数覆盖,
不建议用
这种方式
>>> from math import sin,tan
可以导入模块中的特定函数