
Exercise for reference:
letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]
Answer:
letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"] print(letters[::2])
Explanation:
The complete syntax of list slicing is [start:end:step] . When you don't pass a step, Python assumes the step is 1. [:] itself means to get everything from start to end. So, [::2] means get everything from start to end at a step of two.