num = [1,2,3,4,5] res = num[slice(1, len(num)-1, 2)] print(res)
num = [1,2,3,4,5] res = num[slice(0, len(num), 2)] print(res) #[1, 3, 5]