Question: Write this code in python Write a function repList that receives two input arguments: a list and the number of times the list is to
Write this code in python

Write a function repList that receives two input arguments: a list and the number of times the list is to be duplicated. The function should then return the resulting list. If the second input argument is 0(zero) then the function should return an empty list. Note: you are allowed to use the "append(" list function. You are NOT allowed to use the concatenation (+) nor the repetition ( operators for lists. Some examples of calling the function: print (repList(range (5,0,-1),2) 15, 4, 3, 2, 1, 5, 4, 3, 2, 1 > print (repList([0.1,0],3)) print (repList((0].3) [o, o, 0] print (repList([3].0) Il sprint (repList(range(4,7),0) print (repList(0,7))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
