python切片 Posted on 2020-05-27 Edited on 2020-05-31 In python , 语法 python切片 123456slice(0, 4, 2)# slice(start=0, stop=4, step=2) = indices (0, 2)list_py = list('python')# list_py = ['p', 'y', 't', 'h', 'o', 'n']list_py[ slice(0, 4, 2) ]# ['p', 't']