seen = set()
for n in numbers:
if n in seen:
return False #if no duplicate found
Instead of returning False, you can also raise an exception. Use this:
raise Exception('custom exception message here')
Monday, December 11, 2017
Finding Repeats in an Array or a List - Technical Interview in Python Patterns
Practice using Hash map.
Did you know that being a developer you are at an unique position to help the society? There are many public service opportunities to contr...
Can hack schools solve Silicon Valley's talent crunch? The truth about coding bootcamps and the students left behind http://t.co/xXNfqN...
The bogus request from P2PU to hunt for HTML tags in real life has yielded a lot of good thoughts. My first impression was that this is stup...
This review is updated continuously throughout the program. Yay I just joined the Udacity Nanodegree for Digital Marketing! I am such an Uda...