Python Lists and Dictionaries help!


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/python-beginner-en-pwmb1/1/1?curriculum_id=4f89dab3d788890003000096
<In what way does your code behave incorrectly? Include ALL error messages.>
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.”
<What do you expect to happen instead?>
I received the expected result from the output box, however, Codecademy is giving me an error that doesn’t seem relevant to my code.

```python

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]

<do not remove the three backticks above>

#2

Use the function instead…

list_length = len(suitcase)    # 4

#3

That worked, thanks!