00:02
So in this question we have been asked to write a function that takes in a list as an argument, list of numbers, and then returns the list in the reverse form, completely reversed from index, first to last index.
00:17
So here i have taken a small portion which inputs or takes an input from user as a number of list of numbers.
00:27
And for that i use the input function and i print a message saying enter list of numbers.
00:32
Numbers comma separated and then i in the input function always gives a string as an output so i use that string type to split the input into elements of a list which are separated by a comma so that gives me comma separated elements as a list which again is put into numbs and then i iterate through the elements of that list by saying for n in numbs and i just check if the n is in empty character because it's still in string format still in character format or string format so what can happen is somebody can give you one comma 2 comma 3 comma and so if you have a comma with no number of no character after that there'll be an empty character here we don't want that because that can't be converted into a number and you could also have one comma comma two comma three a mistake like that which will have another empty character which we don't want so to avoid these things i have put this check condition if it is not an empty character we append a empty list num list with the eval output of that element n so the eval will convert finally convert the character or string to the corresponding number and that's how this num list will then be will have all the numbers of the inputs as a list then we and we initialize an empty list and we go through the index of the input list.
02:16
So we say for i in range length of list, which means if the list is 5, this will go from 0 to 1, 2, 3 and 4.
02:24
The other indices of the 5 dimensional list or length of list 5...