Oops, try again. It looks like your middle slice is ["passport"] instead of ["passport", "laptop"]


#1



Oops, try again. It looks like your middle slice is ["passport"] instead of ["passport", "laptop"].

There is a bug??

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:5]                # The last two items (index four and five)


#2

@creat ,

The end index in a slice specification is exclusive. For a guide regarding what you should have for middle and last, look at the slice that is assigned to first as a model.


#3

@creat Splices do not include the last number of the index, for example, the variable first will show "sunglasses", and "hat". So, you many want to rethink what index numbers you should input for the variables "middle" and "last". Message me if you still need help. :slight_smile:

-- @chipjumper36731


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.