Slicing


#1

hi, this doesn't helped me, i put middle = suitcase[2:4] # Third and fourth items (index two and three) but still error


I'm not sure what I'm doing wrong?
#2

can i see an updated version of your code?


#3

it worked with small syntax errors, a space between symbols
first = suitcase[0:2] # The first and second items (index zero and one)
middle = suitcase[2 : 4] # Third and fourth items (index two and three)
last = suitcase[4 :] # The last two items (index four and five)

this worked


#4

so now you are good? No more questions?


#5

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