Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何列出数学模块中的所有函数?_Python - Fatal编程技术网

Python 如何列出数学模块中的所有函数?

Python 如何列出数学模块中的所有函数?,python,Python,有没有办法找出数学模块中的所有函数是什么?我不知道怎样才能找到答案。我尝试过搜索它,但它只是直接告诉我它们是什么,而不是一个内置的帮助 import math for method in dir(math): print method 输出: __doc__ __name__ __package__ acos acosh asin asinh atan atan2 atanh ceil copysign cos cosh degrees e erf erfc exp expm1 fab

有没有办法找出数学模块中的所有函数是什么?我不知道怎样才能找到答案。我尝试过搜索它,但它只是直接告诉我它们是什么,而不是一个内置的帮助

import math
for method in dir(math):
    print method
输出:

__doc__
__name__
__package__
acos
acosh
asin
asinh
atan
atan2
atanh
ceil
copysign
cos
cosh
degrees
e
erf
erfc
exp
expm1
fabs
factorial
floor
fmod
frexp
fsum
gamma
hypot
isinf
isnan
ldexp
lgamma
log
log10
log1p
modf
pi
pow
radians
sin
sinh
sqrt
tan
tanh
trunc

导入数学;帮助(数学)
?如果我正确理解了你的问题,你不只是想看看有哪些函数可用,你还想在每个函数上获得一些帮助吗?从你的问题中根本看不出这一点。你也可以看看python.org
import math;目录(数学)