import numpy a=numpy.arange(10) #索引访问,和字符串索引一样 print(a[-3]) print(a[2]) #切片访问 print(a[:]) print(a[3:4]) print(a[1:7:2]) print(a[::-1])