python的类及对象所在的类

python 的类如下:

  字符串 :str

  数   值 :int

  布尔值:bool

  列   表:lis

  元   组:tuple

  字   典:dict

所有对象所具备的功能都存放在上面对应的类里面。

             i = "test"

     print (type(i))
<type 'str'> str 是i对应的类

i2 = 234
     print (type(i3))
     <type 'int'> ‘int’ 是i2对应的类

可以通过下面的命令查看类对应的各种功能:

             

     dir([object]) -> list of strings  快速查找类都有哪些功能


            help(type(
object)) 查看详细功能

           

            直接点击鼠标 ctrl+鼠标左键

 

posted @ 2017-11-13 21:44  学python  阅读(532)  评论(0编辑  收藏  举报