• 技术文章 >Python技术 >Python基础教程

    python help()获取函数信息

    小妮浅浅小妮浅浅2021-04-24 15:47:20原创2010

    1、使用说明

    在解释器交互模式下获取特定函数和类别的帮助信息非常实用。

    对于内置函数,如果有不清楚的地方,可以使用help()查看说明书。

    2、实例

    比如查看内置函数 any() 的用法:

    >>> help(any) # 只需使用函数名字

    将显示出 any() 的帮助信息:

    Help on built-in function any in module builtins:
     
    any(iterable, /)
        Return True if bool(x) is True for any x in the iterable.
        
        If the iterable is empty, return False.
    (END)

    按下 q 键退出上述界面。

    以上就是python help()获取函数信息的方法,希望对大家有所帮助。更多Python学习指路:python基础教程

    专题推荐:python help
    品易云
    上一篇:python用内置函数进行判断 下一篇:python sorted()函数的参数用法

    相关文章推荐

    • Python dir()和help()帮助函数• 如何使用python的help函数• python的help函数怎么退出• python中如何使用help()• python如何退出help• python的help函数怎么用• python help如何退出• python怎么退出help• help()是Python的函数吗• python help函数的用法是什么?• 如何使用python中的help函数?

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网