X Tutup
Skip to content

Commit 871f406

Browse files
committed
Update palindrome.py
1 parent 0704f2b commit 871f406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

useful_scripts/palindrome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def palindrome(my_str):
44
"""
55
Returns True if an input string is a palindrome. Else returns False.
66
"""
7-
stripped_str = "".join([l.lower() for l in my_str if l.isalpha()])
7+
stripped_str = "".join(l.lower() for l in my_str if l.isalpha())
88
return stripped_str == stripped_str[::-1]
99

1010
if __name__ == '__main__':

0 commit comments

Comments
 (0)
X Tutup