Late arrivals portion


#1

"Then, set list_length equal to the length of the suitcase list."

what does it mean to set "list length" to the suitcase list? D we use len (suitcase) or [3] sorry cant figure this portion out. Lots of time i am overcomplicating it.

suitcase = []
suitcase.append("sunglasses")

Your code here!

suitcase.append("razor")
suitcase.append("towel")
suitcase.append("sharpie")

list_length = ________ # Set this to the length of suitcase

print "There are %d items in the suitcase." % (list_length)
print suitcase


#2

Here you would use list_length = len(suitcase). Make sure you don't have a space between len and (suitcase).
This finds the amount of items in suitcase and assigns it to list_length.


#3

Yep doublediamond is right. I think the reason for doing it this way is in case you make any changes to the amount of items in the suitcase list at a later point. The code would work if you just counted the number of items in the list and used that figure but this is 'hard coding' and basically would stop working if any changes are made afterward.

Remember these practice exercises are very small in comparison to many programs so it is important to have things that still work when parameters fluctuate.