1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Python

Connected

Exercise

Replace list elements

To replace list elements, you subset the list and assign new values to the subset. You can select single elements or you can change entire list slices at once.

For this and the following exercises, you'll continue working on the areas list that contains the names and areas of different rooms in a house.

Instructions

100 XP
  • Update the area of the bathroom to be 10.50 square meters instead of 9.50 using negative indexing.
  • Make the areas list more trendy! Change "living room" to "chill zone". Don't use negative indexing this time.