We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dd3f7f commit 1cc1953Copy full SHA for 1cc1953
pygorithm/string/isogram.py
@@ -0,0 +1,25 @@
1
+# Author: OMKAR PATHAK
2
+# Created On: 17th August 2017
3
+
4
+def is_isogram(word):
5
+ '''
6
+ An isogram (also known as a "nonpattern word") is a logological term for a word
7
+ or phrase without a repeating letter
8
9
+ # Convert the word or sentence in lower case letters.
10
+ clean_word = word.lower()
11
+ # Make ann empty list to append unique letters
12
+ letter_list = []
13
+ for letter in clean_word:
14
+ # If letter is an alphabet then only check
15
+ if letter.isalpha():
16
+ if letter in letter_list:
17
+ return False
18
+ letter_list.append(letter)
19
20
+ return True
21
22
+def get_code():
23
+ """ returns the code for the current class """
24
+ import inspect
25
+ return inspect.getsource(is_isogram)
0 commit comments