首先看下面的代码: # coding: utf-8 class Test(object): pass print Test.__class__ # type print Test.__base__ # object t = Test() print t.__class__ # Test print t.__class__.__class__ # type print Test.__class__.__class__.__class__ # type a = type('Foo', (), {})
python中list的操#python创建列表的时候,会以堆栈的形式存放数据,从右向左往堆栈中存放数据 movies=["The holy Grail","The life of brain","The meaning of life"] movies=[]movies=list() #创建一个空的列表 #len()表示长度print(len(movies))#python append在列表的末尾添加一个元素movies.append(&qu