Skip to content

Instantly share code, notes, and snippets.

@adammenges
Last active Aug 29, 2015
Embed
What would you like to do?
from collections import defaultdict
def isUnique(string):
seen = defaultdict(lambda: False)
for x in string:
if not seen[x]: seen[x] = True
else: return False
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment