Question: 1. (7 pts) Write a lambda function trimReverse that accepts a list argument and performs the following: eliminates all the elements in even-numbered positions removes

1. (7 pts) Write a lambda function trimReverse that accepts a list argument and performs the following: eliminates all the elements in even-numbered positions removes any entries that are smaller than 10, and returns the remaining list in reverse order. Note: For full credit, avoid the use of the reverse method, and the len, range, and reversed functions. The function should contain only one line of code. In [ ]: # put your code here Test it by running the cell below. The result should be [19, 17, 15, 13, 11] [20, 30] In [ ]: # DO NOT DELETE a = list (range (20)) b = [1,5,15,30,3,20,6] print(trimReverse(a)) print(trimReverse(b))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
