 In Python, it's possible to have lists inside of lists. These are called nested lists. Let's say we measure the minimum, average, and maximum temperature every day for a week. We can represent it as a nested list as you see starting on line 8. Let's take a look at that nested list up close and personal. The main list has 7 elements numbered 0 through 6, and each element is itself a list. If we were to print temps sub 2, we'd see this entire sub-list printed out. Let's try it. Print temps sub 2. And there's our list inside the main list. Temps sub 2 is a list that has 3 elements numbered 0 through 2. If we wanted to print the first element in the highlighted row, the 29.0, we'd print the element at index 0 in the row that's at index 2. Here's how you say that in Python. You print temps sub 2 to access the row, sub 0 to get to the first element in that row. And there's the 29. Here's a print statement that prints 3 other elements from the nested list. I've put numbers on lines 7 through 14 to help you figure out which row and which column is which. What do you think this print statement will print? Pause the video and figure it out before continuing. Did you get the right answer? Temps sub 6 sub 1 is row 6 column 1, 30.4. Temps sub 3 sub 2 is row 3 column 2, which is the 29.3. And temps sub 4 sub 0 accesses row 4 and element 0 inside that row, which prints the 24.6. Okay, now let's write a program to find the lowest minimum temperature and the highest maximum temperature for the week. The way we've laid out the data, you can think of each sublist as a row and each entry in the sublist as a column within that row. We'll start with a function called find minimum that has two parameters, the nested list of data, and the column whose minimum we want to find. This is more general than just finding the minimum of column 0. That way if I wanted to find the lowest average temperature I could use the same function, I'd just give it a different column number to process. Here's how this function is going to work. We'll start the minimum value as the entry in row 0 of the column we're looking at. We then look at the entries for every subsequent row. 30 is not less than the minimum value. 29 is not less than the minimum value. 25 is less, so that becomes our new minimum value. 24.6 is less than 25, so that becomes the new minimum value. 22.3 is even less, so it becomes the minimum value. 28.9 is not less than 22.3. And when the loop ends, our minimum value has the minimum entry from that column of elements. Let's translate that into Python code. We'll set our minimum value to the data in row 0 at the column we're interested in, and then we'll find the number of rows in the nested list. For row in range 1 through n, namely the rest of the rows, if the data at the given row and column is less than the minimum value, then the minimum value becomes the data point at that element. When the for loop is finished, we can return the minimum value. Now let's write and invoke the main function. We'll define main to set the lowest minimum to find the minimum of our temperature's data column 0. And we'll print the lowest minimum temperature is degrees Celsius dot format lowest min. Invoke main and run the program. The lowest minimum temperature is 22.3 degrees. And let's spell temperature correctly the next time we run it. To find the maximum value in the column, the logic is the same, only the names have changed. Let's copy and paste the minimum finder, change minimum to maximum. We start out with the maximum value being the first item in the column. And this time if the data in the row and column is greater than the maximum value, then the maximum value becomes the data element and we're going to return the maximum value. And in a similar fashion we can say our highest maximum is find maximum from the temperature's nested list. This time column 2, which is the maximum temperature for the day. And the highest maximum temperature is degrees Celsius dot format highest max. Let's run the program. The lowest minimum is 22.3, the highest maximum is 31.6. And if we look at the original data, sure enough this is our lowest minimum and that's our highest maximum. And that's how you work with nested lists in Python.