Two Dimensional Lists
List initialization:
Option 1:
a = [[
0 for i in range(COL)] for j in range(ROW)]
The above line will create a list of ROW rows and COL columns and assign value 0 to each
element
Test 2 Preparation Example: Write a program that asks user to enter the number of family members with Facebook account, their names, and the number of hours they spend on Facebook per day during the weekdays. The program finds the total number of hours per family member and the family member who spend the most time on Facebook. Store hours in 2-d list. One rows stores hours for one family member. The number of rows is the number of family members, the number of columns is 5 in our example (there are 5 weekdays). Store family names in additional 1-d list.