Skip to content

Commit 54189e6

Browse files
committed
Minor refactor on palindrome_test function
1 parent 9ad65c0 commit 54189e6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

palindrome/palindrome.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ def reverse(string):
1515

1616
def palindrome_test(word):
1717
''' Returns true if a word is palindrome '''
18-
if remove_special_char(word) == reverse(remove_special_char(word)):
19-
return True
20-
else:
21-
return False
18+
return remove_special_char(word) == reverse(remove_special_char(word))
2219

2320

2421
def main():

0 commit comments

Comments
 (0)