the difference of list and numpy :
list : it can store any format value at the same time, such as int, str
numpy:the inside of the numpy.array must be the same format
the difference of list and tuple :
list: it is an ordered set.it can add and delete any element of the set by any time.
tuple: it is also an ordered set.But it can not add and delete any element of the set when it is initialized.
the operation of slice:
vector=numpy.array([5,10,15,20])
print(vector[0:3])#[0:3]代表一个左开右闭的区间
[5,10,15]
B[:3]表示:索引从0开始取,直到索引3为止,但不包括索引3。即索引0、1、2,正好3个元素。
B[:]原样复制一个list
B[:10:2]前10个数,每两个取一个
B[::2]所有数,每两个取一个