2401241-列表切片

my_list = [1,2,3,4,5,6]

reduced_list = my_list[::3]

reduced_list[0]=10

print(reduced_list)

# out:[10, 4]

你可能感兴趣的:(python)