Lists are mutable and dynamic; list items can be added, removed or changed after the list is defined. Lists are ordered; newly added items will be placed at the end of the list. Lists use zero-based indexing; every list item has an associated index, and the first item's index is 0. Duplicated list items are allowed.
05:11I will generate a list so that the sort of effect can be found.
05:15So, let's see, there are some numbers that are found.
05:18So, let's see, there are some bunch of random numbers.
05:21Right?
05:22Here, here, let's say, 7, OK.
05:28So, here bunch of numbers are found.
05:30This is random.
05:31If you use mixed numbers on solid method, then you will know what will.
05:40Mixed numbers on the method and print them.
05:43So, let's see, this is original list.
05:46As you guessed,
05:48Yes, we had an unordered mixed list. However, when we sorted it, we ordered two, three, four, four, four, five, six, seven, nine and so on.
06:02Now, when I have assigned a new list, it has no return. The reason is that the sort method by itself is in the original list, which is not return.
06:15What if I want to return something?
06:17So, this is a method, a function of sorted, which we call.
06:22So, this is a little bit of a difference.
06:25I say sorted, sorted.
06:27Sorted, we give it an iterable.
06:29Let's say mixed value is iterable.
06:32Now, I can assign value to this.
06:37This is new underscore value.
06:42This is sorted method call.
06:44New value.
06:45Now, if I print new value, I will return a list.
06:51This is a list.
06:53Okay?
06:54And if I remember, if I print a new number, then it will return none.
07:01Make sense?
07:03Okay?
07:04Sort method.
07:05Sort method.
07:06So, sorted function.
07:08However, return.
07:10Sort method.
07:11Sort method.
07:12Sort.
07:13Sort.
07:14Basically, organize.
07:15Okay?
07:16So, it will release a list.
07:17So, it will be the same.
07:18So, the method is the same.
07:19I will start in the list.
07:20So, if I draw the list from the other side, it will release a table.