美文网首页
python 如何查看模块函数

python 如何查看模块函数

作者: BioLearner | 来源:发表于2019-03-14 22:07 被阅读0次

    适用问题:python 中如何查看模块中的函数。
    以math模块为例

    import math
    print(dir(math))   #查看math模块中有哪些函数
    print(help(math.log10))  #查看math模块中log10函数的简短解释
    

    相关文章

      网友评论

          本文标题:python 如何查看模块函数

          本文链接:https://www.haomeiwen.com/subject/wlphmqtx.html