手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

如何使用好python的help功能

时间:2024-10-11 23:01:37

1、首先进入python shell界面,不会的话看我前面的经验吧。

如何使用好python的help功能

2、输入help,弹出了提示:Type help() for interactive help, or help(object) for help about object.需要交互式的帮助的话输入help();需要查看某个对象的帮助的话用help(对象)。

如何使用好python的help功能

3、我们进入交互式帮助界面。help()

如何使用好python的help功能

4、进入交互式帮助界面,命令提示变成了这样。Welcome to Python 3.6's help utility!If t茑霁酌绡his is your first time using Python, you should definitely check outthe tutorial on the Internet at https://docs.python.org/3.6/tutorial/.Enter the name of any module, keyword, or topic to get help on writingPython programs and using Python modules. To quit this help utility andreturn to the interpreter, just type "quit".To get a list of available modules, keywords, symbols, or topics, type"modules", "keywords", "symbols", or "topics". Each module also comeswith a one-line summary of what it does; to list the modules whose nameor summary contain a given string such as "spam", type "modules spam".

如何使用好python的help功能

5、如果我想获取input函数的功能,输入坡纠课柩input就可以了Help on built-in function input in module builtins:input(prompt=None, /) Read a string from standard input. The trailing newline is stripped. The prompt string, if given, is printed to standard output without a trailing newline before reading input. If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError. On *nix systems, readline is used if available.

如何使用好python的help功能

6、这个功能将在学习中起到很大的帮助,不过需要看得懂英语。那么怎么退出帮助命令行呢?输入quit就可以了。You are now leaving help and returning to the Python interpreter.If you want to ask for help on a particular object directly from theinterpreter, you can type "help(object)". Executing "help('string')"has the same effect as typing a particular string at the help> prompt.

如何使用好python的help功能
© 手抄报圈