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 alist my_list and returns a new list in which each element is

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

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!