avatar

Catalog
Dir()和help()

python内置了很多内置函数、类方法属性及各种模块。当我们想要当我们想要了解某种类型有哪些属性方法以及每种方法该怎么使用时,我们可以使用dir()函数和help()函数在python ide交互式模式下获得我们想要的信息。

dir()用来查询一个类或者对象所有属性.

help()函数帮助我们了解模块、类型、对象、方法、属性的详细信息

Author: realLiuSir
Link: http://yoursite.com/2020/05/29/dir()%E5%92%8Chelp()/
Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Donate
  • 微信
    微信
  • 支付寶
    支付寶