标签:linux
List是一个对象,它有一此内置的方法,如:
包含关系: in, not in
>>> a = [1, 3, 5, 7];
>>> 3 in a
True
>>> 8 in a
False
>>> 8 not in a
True
>>>
连接符: +
>>> a + [9, 11]
[1, 3, 5, 7, 9, 11]
重复: *
>>> a * 2
[1, 3, 5, 7, 1, 3, 5, 7]
>>>
本文出自 “dba天空” 博客,请务必保留此出处http://9425473.blog.51cto.com/9415473/1692382
标签:linux
原文地址:http://9425473.blog.51cto.com/9415473/1692382