A list doesn’t have to have a fixed length. You can add items to the end of a list any time you like!

letters = ['a', 'b', 'c'] letters.append('d') print len(letters) print letters
  1. In the above example, we first create a list called letters.
  2. Then, we add the string 'd' to the end of the letters list.
  3. Next, we print out 4, the length of the letters list.
  4. Finally, we print out ['a', 'b', 'c', 'd'].



On lines 5, 6, and 7, append three more items to the suitcase list, just like the second line of the example above. (Maybe bring a bathing suit?)

Then, set list_length equal to the length of the suitcase list.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?