type
1.返回数据的类型
>>> a=1
>>> type(1)
<class 'int'>
>>> type(int)
<class 'type'>
#type生成int类型,int生成 1
type ==>int==>1
type生成class,class生成obj(对象)
2.动态创建类对象
Student = type('Studnet',(object,),{'hello':hello,'name':'zzh'})
类名 继承 方法 属性
object
是最顶层的基类