Late Arrivals & List Length issue


#1

Hello! Once more, I am VERY confused... I made my code:

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

# Your code here!
suitcase.append("socks")
suitcase.append("shirt")
suitcase.append("pants")



list_length = len(4)
# Set this to the length of suitcase

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

and my error:
Oops, try again. Your code looks a bit off. Your code threw the following error: object of type 'int' has no len()


#2

Hi, @agriggs11 ,

This is not what you need to do ...

list_length = len(4)

Instead, when you call the len function, pass it suitcase as an argument, so that Python can determine for you the number of items in suitcase.


#3

ohhhhhhhhhhhhhhh duuuuh thank you


#4

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