Skip to content

Commit 0061dab

Browse files
author
Jonathon Belotti
authored
Merge pull request thundergolfer#1 from mgbox/mbox
added a solution
2 parents e412460 + edf8a94 commit 0061dab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Check if a string is composed of all unique characters
2+
# author: Matt Box
3+
4+
def all_unique(string):
5+
letters = sorted(string)
6+
for i in range(len(letters) - 1):
7+
if letters[i] == letters[i + 1]:
8+
return False
9+
return True
10+

0 commit comments

Comments
 (0)