Created
December 10, 2017 12:59
-
-
Save kareemsuhail/826ddf43dc1ba75ea1f4307d61e5f2cc to your computer and use it in GitHub Desktop.
this code is for careem internship
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def firstNonRepeatingLetter(word): | |
for char in word: | |
if word.lower().count(char.lower()) == 1 : | |
return char | |
return "" | |
# manuel Testing | |
print(firstNonRepeatingLetter("sTreSS")) | |
print(firstNonRepeatingLetter("sdasddd")) | |
print(firstNonRepeatingLetter("wWw")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment