List


#1

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

Your code here!

suitcase.append("party hat")
suitcase.append("money")
suitcase.append("rocks")

list_length = 4 # Set this to the length of suitcase

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

something is wrong with the code, for unknown reason it is returning the following error:

Oops, try again. Remember: len(list_name) will return the length of a list as an integer.

but i am getting the correct output!!!!


#2

We are expected to use the len() function on the right side, not a literal value.


#3

oh ok, thank you!:grin:


#4

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