list of methods for python shell?

后端 未结 9 1399
鱼传尺愫
鱼传尺愫 2021-02-13 21:27

You\'d have already found out by my usage of terminology that I\'m a python n00b.

straight forward question:

How can i see a list of methods for a particular obj

9条回答
  •  星月不相逢
    2021-02-13 21:49

    dir( object )

    will give you the list.

    for instance:

    a = 2
    dir( a )
    

    will list off all the methods you can call for an integer.

提交回复
热议问题