List Slicing


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

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

I don't know what is wrong!

It says this: Oops, try again. Did you remember to assign a sliced list to all three variables? Your code caused the following error: global name 'first' is not defined



At the end of the line starting with middle you close with an accolade } instead of a bracket ] oops
If you want the third and the fourth item you want suitcase[2:4] just like first and last so you just miscounted middle.