#!/usr/bin/python
# -*- coding: utf-8 -*-
import math
import random
# 返回一个math的方法列表
print(dir(math))
# 结果:['__doc__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'inf', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log10', 'log1p', 'log2', 'modf', 'nan', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'tau', 'trunc']
# 查看math的文档注释
help(math)
# 结果:
# Help on built-in module math:
#
# NAME
# math
#
# DESCRIPTION
# This module is always available. It provides access to the
# mathematical functions defined by the C standard.
#
# FUNCTIONS
# acos(...)
# acos(x)
#
# Return the arc cosine (measured in radians) of x.
#
# acosh(...)
# acosh(x)
#
# Return the inverse hyperbolic cosine of x.
# 打印random模块的文件路径
print(random.__file__)
# 结果:E:\python\lib\random.py