FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pygorithm/pygorithm/strings/isogram.py at master · OmkarPathak/pygorithm · GitHub
OmkarPathak
/
pygorithm
Public
Notifications
You must be signed in to change notification settings
Fork
503
Star
4.4k
Code
Issues
3
Pull requests
6
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pygorithm
/
pygorithm
/
strings
/
isogram.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (28 loc) · 747 Bytes
Breadcrumbs
pygorithm
/
pygorithm
/
strings
/
isogram.py
Copy path
File metadata and controls
34 lines (28 loc) · 747 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
Author: OMKAR PATHAK
Created On: 17th August 2017
"""
import
inspect
def
is_isogram
(
word
):
"""
An isogram (also known as a "nonpattern word")
is a logological term for a word or phrase
without a repeating letter
:param word: word to check
:return: bool
"""
# Make an empty list to append unique letters
letter_list
=
[]
for
letter
in
word
.
lower
():
# If letter is an alphabet then only check
if
letter
.
isalpha
():
if
letter
in
letter_list
:
return
False
letter_list
.
append
(
letter
)
return
True
def
get_code
():
"""
returns the code for the is_isogram function
:return: source code
"""
return
inspect
.
getsource
(
is_isogram
)
Back
|
FazBrowse Home
|
New Git URL