Write а functiоn definitiоn thаt tаkes in оne list L.The function returns a value as shown below. if the list has an odd number of elements, return the average of the first, middle and last element.Otherwise return the average of the two middle elements. For example, if the list is [1,2,3,4,5] return the average of 1 and 3 and 5, otherwise if the list is [1,2,3,4] return the average of 2 and 3. Do not add any comments. Then complete the code for a main function that starts as shown: def main(): ML = [.......] #where ....... are a bunch of numbers separated by commas. Display the result of calling the function above on that list then call main.