Question: please write in python Write a program that creates list L and initialize it with 5 random numbers between 10 and 20. Create a function
Write a program that creates list L and initialize it with 5 random numbers between 10 and 20. Create a function that takes list L, removes the first element, replaces the last element with it, and returns the list L. Your program should print the original list and the new list returned by the function. Sample output for L = [17,15,17,10,12] Old List: [17, 15, 17, 10, 12) old List, after removing the first element and replacing last element with it: [15, 17, 10, 17]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
