<list_name>[start:stop:step]
list의 start index부터 stop index 전(stop index 값은 포함하지 않는다)까지 step 간격으로 slicing한 list를 반환한다.
step이 음수일 경우, 역순으로 슬라이싱한다.
stop이 음수일 경우, 맨 마지막에서 |stop| 번째 값을 반환한다.
>>> a = [1, 2, 3, 4, 5, 6, 7]
>>> a[::-1]
[7, 6, 5, 4, 3, 2, 1]
>>> a[-1::-1]
[7, 6, 5, 4, 3, 2, 1]
>>> a[-3:-1]
[5, 6]
>>> a[-1:-3]
[]
>>>> a[-1:-3:-1]
[7, 6]