python模块属性查询,help使用注意事项

来源:互联网 发布:智能手机数据开关app 编辑:程序博客网 时间:2024/06/06 05:33

采用help(模块名)

注意:模块名一定要用引号

exp:

help("random")

如果直接用

help(random)

报错:

Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    help(random)
NameError: name 'random' is not defined

即:所需帮助查询的模块名未定义

1 0