Question: Question 2: Remove Duplicates (2 points) Write function removeDup that takes in a list of items and removes any duplicates in that list while maintaining

Question 2: Remove Duplicates (2 points) Write function removeDup that takes in a list of items and removes any duplicates in that list while maintaining the order of the items. The function should return a list with only the first occurance of each item. Your function should be able to handle lists of numbers and strings. In [ ]: def removeDup(data): pass ### YOUR SOLUTION HERE # YOUR CODE HERE raise NotImplementedError() In [ ]: print("Test 1 : ", removeDup([1,2,3,4,3,3,4])==[1,2,3,4]) print("Test 2 : ", removeDup("The quick brown fox jumped over the lazy dog.") == ['t', 'h', 'e', print("Test 3: ", removeDup("I am Sam Sam I am would you like green eggs and ham?".split(" ")) == ['I' In [ ]: In [ ]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
