>>> st=[1,2,'dflx'];
>>> len(st);
3
>>> df=[6,8,"great"];
>>> st+df
[1, 2, 'dflx', 6, 8, 'great']
>>>...>>> a=9;
>>> df.extend(a);
Traceback (most recent call last):
File "", line 1, in
TypeError...好像见鬼了,在ubuntun中,是python3.5;
>>> num=[];
>>> num
[]
insert(i,x)将元素x插入到i位置。...>>> ch.sort();
>>> ch;
['a', 'b', 'c']
列表和字符串二中类型的对象有许多相似之处,但是也有很大区别。...相同点二者都属于序列类型,不管组成列表的元素,还是组成字符串的元素都可以从左到右,依次建立索引访问。