0:00
Hello.
00:01
For programming exercise 11 .26, you're being asked to write a function that will sort a two -dimensional list.
00:11
It should return a new list with the original list remaining intact.
00:17
And then you want to write a test program that will prompt a user to enter a 3x3 matrix and then will display the row sorted matrix.
00:27
So for the function, we've got defined sort rows here of m or m is the matrix you enter.
00:35
I found that just by making a copy of the two -dimensional list, i could not get it to make a true independent copy.
00:47
So i am using copy.
00:50
Deep copy to copy my list.
00:53
It should work to just use copy, but it just was not working for me.
00:59
I'm not sure why, but this did work.
01:01
So i'm importing copy here.
01:03
And then i'm starting by making an independent copy of my list using copy.
01:08
Toppe copy of m.
01:10
So we're going to actually sort sorted matrix here, and m is going to stay the way that it was.
01:17
So we'll iterate through the rows of sorted matrix and sort each row.
01:21
Then we will return sorted matrix...