Help with 5.5


#1

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

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

This is my code, but I get an error that says: "Oops, try again. It looks like your first slice is ["sunglasses"] instead of ["sunglasses", "hat"]."

Any idea on how to help?? Thanks!!


#2

Found this in the instructions when i was having the same problem
"We start at the index before the colon and continue up to but not including the index after the colon."


#3

Because of that your code should use 6 in the last slice because it stops at the value before that, also known as 5, aka "shoes"


#4

Thanks so much!! :smile: I guess I skimmed over that part :stuck_out_tongue: