I write function called has_duplicates that takes a list and returns True if there is any element
Fantastic news! We've Found the answer you've been seeking!
Question:
I write function called has_duplicates that takes a list and returns True if there is any element that appears more than once. It should not modify the original list.
For example:
>>> t1 = [5, 1, 2, 3, 4]
>>> has_duplicates(t1)
False
>>> t2 = [5, 1, 2, 3, 2, 8, 10]
>>> has_duplicates(t2)
True
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date: