Question: Hello! Can anybody help me with a simple python program? Thank you! 1. Write a function named noDups () that accepts a List as an
1. Write a function named noDups () that accepts a List as an argument and returns a new List that does not include any duplicate values. 2. Your function must use a loop to create the new List 3. Your noDups () function must complete the following tasks: Accept a List as an argument . Define a new List Use a loop to increment through the values of the original List Add only unique values from the original List to the new List Return the new List containing no duplicate values . Example input/output for the noDups () function >>> no Dups ([1, 3, 2, 4, 3, 3, 2]) [1, 3, 2, 4] >>> noDups ( ["hello", "goodbye", "whats up", "hello"]) ('hello', 'goodbye', 'whats up'] >>> noDups ((1.1, 1.2, 3.2, 3.2, 1.2, 1.1]) [1.1, 1.2, 3.2]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
