Python Lists and Dictionaries help!


Upon running my code, I get the expected result in the output box at the top right. However, I receive the error message "Oops, try again. Remember: len(list_name) will return the length of a list as an integer."

I received the expected result from the output box, however, Codecademy is giving me an error that doesn't seem relevant to my code.

Replace this line with your code. 
suitcase = [] 

# Your code here!
suitcase.append("bathing suit")

list_length = 3 # Set this to the length of suitcase

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


Use the function instead...

list_length = len(suitcase)    # 4


That worked, thanks!