首页 > 编程语言 > 详细

python的类及对象所在的类

时间:2017-11-13 22:32:20      阅读:292      评论:0      收藏:0      [点我收藏+]

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+鼠标左键

 

python的类及对象所在的类

原文:http://www.cnblogs.com/ylpython/p/7828385.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!