python培训之help()获取函数信息

发布时间:2023-03-09 09:21:43 人气:19 作者:多测师

  python help()获取函数信息

  1、使用说明

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

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

python培训之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学习指路:请关注多测师。https://www.e70w.com/xwzx/




返回列表
在线客服
联系方式

热线电话

17727591462

上班时间

周一到周五

二维码
线