Stupid Suitcasae


#1

So can anyone tell me why this isn't working.

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

Your code here!

suitcase.append("hat")
suitcase.append("beer")
suitcase.append("suncream")

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

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


#2

You almost had it!

list_length = (len.suitcase)

You forgot that len doesn't use dot syntax, but function syntax.

#Corrected
list_length = len(suitcase)

#3

sorry yeh i have that in my code. Was just mistake when writing it up on here
It still doesnt work


#4

File "python", line 10
list_length = len.(suitcase)# Set this to the length of suitcase
^
SyntaxError: invalid syntax


#5

Post your correct code...

It is telling you have the problem I already pointed out.


#6

Sorry if im being stupid here and missing something obvious, but heres my code

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

suitcase.append("hat")
suitcase.append("beer")
suitcase.append("chair")

list_length = len.(suitcase)

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


#7

wait ive spotted my mistake


#8

never mind ive done it.
thanks