+ 5

Python/javascript isogram

someone help me with the code to remove all repeating chars on a word: isogram and also prints the number of repeating values removed using functions maybe you can try and fix this but include the number of characters emitted https://code.sololearn.com/ck8vF7k2M4zx/?ref=app

30th Jun 2017, 4:48 AM
Krafty Coder
Krafty Coder - avatar
2 Réponses
+ 1
# you can use set to quickly filter duplicates in a string def isIsogram(word): unique_letters = set(word) length_difference = len(word)-len(unique_letters) if length_difference == 0: return (word,True) else: return (word,False,length_difference) print(isIsogram('abcdefghi')) print(isIsogram('aabbccdd'))
30th Jun 2017, 7:20 AM
richard
3rd Mar 2018, 6:54 AM
Vikash Pal
Vikash Pal - avatar
Aujourd'hui en vedette
.
1 Votes
What?
0 Votes
HTML
0 Votes
Web
0 Votes
Quiz duel
0 Votes
FRC Coding?
1 Votes
AI
2 Votes
help
0 Votes
APIs
1 Votes