Learn

Congratulations! Now you’ve learned about another data type known as a list.

  • A list is an ordered sequence of information
  • We can access an item in a list by using its index position
  • We can append items to the end of the list or insert them in the middle
  • We can also pop an item from the end or remove from the middle of a list

Lists provide us with a powerful means of storing and accessing multiple pieces of data within our programs. Next time you store a lot of information, consider using lists!

Instructions

This exercise is meant to serve as a review. We’ve unlocked all the commands, and there are many ways to solve this exercise. Make the left list match the right.

Consider starting the left list with different configurations in order to practice!

Hint
Use any combination of commands that ends up with a pink, yellow, red, and blue list.
Solution
Append pink Append blue Append red Append blue

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?