[python]help 函数
2015-11-23 10:44
519 查看
1.在python中,如果对某个函数不了解,可以使用help(‘函数名’)来帮助获得函数的相关信息
示例:
运行结果:
从打印的结果可以看出,raw_input用于从标准输入读取一个字符串。遇到EOF后,开始执行。在Windows下,输入字符串后,按下Enter键即可。
示例:
help(raw_input)
运行结果:
Help on function raw_input in module sitecustomize: raw_input(prompt='') raw_input([prompt]) -> string Read a string from standard input. The trailing newline is stripped. If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError. On Unix, GNU readline is used if enabled. The prompt string, if given, is printed without a trailing newline before reading.
从打印的结果可以看出,raw_input用于从标准输入读取一个字符串。遇到EOF后,开始执行。在Windows下,输入字符串后,按下Enter键即可。
相关文章推荐
- <LeetCode><Medium> 3 Longest Substring Without Repeating Characters
- Python之删除代码中空白行
- selenium python (一) 开发环境搭建
- python中数组,元组,字典和字符串之间的转换
- python批量打多渠道包
- Python 最佳实践
- python中使用多继承
- 利用Sublimetext3&virtualenv 打造一个Web&Python IDE
- python学习之路之案例1(修改haproxy的配置文件,并实现下线、上线的功能)
- ubuntu 14.04 打开Python2.7 IDLE
- python模块导入过程
- python中的map、filter、reduce函数
- python参数传递那些事
- python使用pickle序列化对象至文件
- python内置数据类型
- Python Env
- python之路第五篇之装饰器:(进阶篇)
- 学习Python (三)
- leetcode之Implement Trie (Prefix Tree)
- python 监控jvm脚本