Learning Scientific Programming with Python (2nd edition)
Q4.2.2: Removing duplicates from a list
Question Q4.2.2
Write a function, using set
objects, to remove duplicates from an ordered list
. For example,
>>> remove_dupes([1,1,2,3,4,4,4,5,7,8,8,9])
[1, 2, 3, 4, 5, 7, 8, 9]