List slicing help


#1

Here is my code. It's not working

suitcase = ["sunglasses", "hat", "passport", "laptop", "suit", "shoes"]

first = suitcase[0:2] # The first and second items (index zero and one)
middle = [2:4] # Third and fourth items (index two and three)
last = [4:6] # The last two items (index four and five)

It comes up with this error:

File "python", line 4
middle = [2:4] # Third and fourth items (index two and three)
^
SyntaxError: invalid syntax


#2

you forget the ‘suitcase’ :slight_smile: