初学Python的学习笔记9----面向对象编程(获取对象信息、实例属性和类属性)、面向对象高级编程(使用__slots__、使用@property)...

2019独角兽企业重金招聘Python工程师标准>>> 编程 1.获取对象信息 (1)使用type():判断对象类型,返回对应的class类型 print type(123) # int print type('yj') # 字符串 print type(True) # 布尔值 print type(None) print type(abs) # 函数 #输出信息 <type 'i
相关文章
相关标签/搜索