Question: Write a Python function that takes a list and returns a new list containing only every n^th element of the list def decimate_list (original_list, factor):

Write a Python function that takes a list and returns a new list containing only every n^th element of the list def decimate_list (original_list, factor): decimated-list = [] # FILL IN HERE return decimated_list print (decimate_list (range(10), 3)) # prints [0, 3, 6, 9]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
