Python Lists and Dictionaries help!


#1



https://www.codecademy.com/courses/python-beginner-en-pwmb1/1/1?curriculum_id=4f89dab3d788890003000096

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 = [] 
suitcase.append("sunglasses")

# Your code here!
suitcase.append("suntan")
suitcase.append("clothes")
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]


#2

Use the function instead...

list_length = len(suitcase)    # 4

#3

That worked, thanks!