Write a function called unique that will accept a list of integers, which may contain duplicate
Fantastic news! We've Found the answer you've been seeking!
Question:
- Write a function called unique that will accept a list of integers, which may contain duplicate values, and returns a list with the duplicates removed. Your function may not use any built-in python functions and must follow the FDR. If you choose, you may implement a helper function that your unique function can call.
Note: The order of the values that appear in the list without duplicates is irrelevant, as long as all of them appear.
Here’s an example:
>>> unique([1, 2, 3, 5, 2, 4, 4, 1])
>>> [1, 2, 3, 5, 4]
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date: