Question: Write and test the following function: def clean_list(values): ------------------------------------------------------- Removes all duplicate values from a list: values contains only one copy of each of

Write and test the following function:

def clean_list(values): """ ------------------------------------------------------- Removes all duplicate values from a list: values contains only one copy of each of its integers. The order of values must be preserved. Use: clean_list(values) ------------------------------------------------------- Parameters: values - a list of integers (list of int) Returns: None ------------------------------------------------------- """ 

Add this function to the PyDev module functions.py. Test it from .

Reminder: this function does not return a list - it updates the list it takes as a parameter. Example:

Values: [1, 2, 0, 1, 4, 1, 1, 2, 2, 5, 4, 3, 1, 3, 3, 4, 2, 4, 3, 1, 3, 0, 3, 0, 0] Cleaned: [1, 2, 0, 4, 5, 3]

DO NOT MAKE A BRAND NEW LIST, UPDATE THE EXISTING ONE

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!