热线电话:13121318867

登录
2019-01-18 阅读量: 707
如何使用python中的帮助功能

Python中的帮助功能

python帮助函数用于显示模块,函数,类,关键字等的文档.help
函数具有以下语法:

如果在没有参数的情况下传递帮助函数,则交互式帮助实用程序将在控制台上启动。 让我们在python控制台中查看print函数的文档。

help(print)

它给出了以下输出:

Help on built-in function print in module builtins:

print(...)
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)

Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout.
sep: string inserted between values, default a space.
end: string appended after the last value, default a newline.
flush: whether to forcibly flush the stream.

0.0000
4
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子