python中如何使用help命令?

python下 help()使用方法

 

查看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")  / help(open)

查看python其他模块中的子模块:help(maplotlib.pyplot)    #前提是先要把该模块import进来,

如果是查看该子模块里的函数,还要再 from package import module

比如要查看matplotlib中pyplot里的scatter函数,则需要 :

import matplotlib
from matplotlib import pyplot as plt
help(plt.scatter)

 

 

参考博文:http://www.cnblogs.com/laifu/p/3633034.html

转载于:https://www.cnblogs.com/zichun-zeng/p/4122861.html

  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值