Session Ready
Exercise

List of lists

As a data scientist, you'll often be dealing with a lot of data, and it will make sense to group some of this data.

Instead of creating a flat list containing strings and floats, representing the names and areas of the rooms in your house, you can create a list of lists. The script in the editor can already give you an idea.

Don't get confused here: "hallway" is a string, while hall is a variable that represents the float 11.25 you specified earlier.

Instructions
100 XP
  • Finish the list of lists so that it also contains the bedroom and bathroom data. Make sure you enter these in order!
  • Print out house; does this way of structuring your data make more sense?
  • Print out the type of house. Are you still dealing with a list?