Question: Exercise 5.7, p. 202 (Duplicate Elimination) - Slightly Modified. Create a function named eliminate_dups that receives a list as a parameter and creates a new

Exercise 5.7, p. 202 (Duplicate Elimination) - Slightly Modified. Create a function named eliminate_dups that receives a list as a parameter and creates a new list that eliminates any duplicate values, returning this (possibly shorter) list containing only the unique values in sorted order. Test your unction with the provided list of numbers and list of strings. tint: Start your function with a new empty list into which you will append values from the list parameter one at a time IF that value isn't already stored in he new list. Use a for loop to step through the values in the parameter list and test if each value is already stored in the new list using keyword in . When the loop is over, your new list should contain every value in the original parameter list without any duplicates. Return a sorted version of this new list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
