Question: Python Part C ( 6 points: The function f(my_list) gets a list my_list and returns a new list in which each element is duplicated twice.


Python Part C ( 6 points: The function f(my_list) gets a list my_list and returns a new list in which each element is duplicated twice. Example : f([-1,4,5]) == (-1,-1,4,4,5,5] f([7]) == [7,7] Complete the following code for the function f : def f(my_list): return Requirements : All the code to be completed MUST be written in 1 line after the word return. Must not use recursion. Remark : Solution that does not fulfil the requirements is not guarantee to get points
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
