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

 please write in python Write a program that creates list L
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 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!