您的位置:首页 > 编程语言 > Python开发

Python help()函数用法详解

2015-03-08 14:07 1081 查看
很多常用的python函数或模块,经常需要查看帮助,很不方便。

在python的交互命令行下使用help()或在python文件中调用help()函数可以很方便的查看帮助。

一 查看所有的关键字:help("keywords")

二 其他

查看python所有的modules:help("modules")

单看python所有的modules中包含指定字符串的modules: help("modules yourstr")

查看python中常见的topics: help("topics")

查看python标准库中的module:import os.path + help("os.path")

查看python内置的类型:help("list")

查看python类型的成员方法:help("str.find")

查看python内置函数:help("open")
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: