后浪云Python教程:python help()获取函数信息
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教程
版权声明:
作者:后浪云
链接:https://www.idc.net/help/175263/
文章版权归作者所有,未经允许请勿转载。
THE END