python help()获取函数信息

383次阅读
没有评论

python

python help()使用说明

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

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

python help()获取实例

比如查看内置函数 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 键退出上述界面。

神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试

相关文章:

版权声明:wuyou2021-04-24发表,共计339字。
新手QQ群:570568346,欢迎进群讨论 Python51学习