1. Learn
  2. /
  3. Courses
  4. /
  5. Intermediate Python for Data Science

Connected

Exercise

Loop over list of lists

Remember the house variable from the Intro to Python course? Have a look at its definition on the right. It's basically a list of lists, where each sublist contains the name and area of a room in your house.

It's up to you to build a for loop from scratch this time!

Instructions

100 XP

Write a for loop that goes through each sublist of houses and prints out the x is y sqm, where x is the name of the room and y is the area of the room.