Skip to content

Commit f3d8a24

Browse files
author
Christian Bender
committed
improved Palindrome_Checker.py
1 parent 9e266f5 commit f3d8a24

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Palindrome_Checker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
else:
1515
phrase = givenPhrase
1616

17-
string = "".join(char.lower() for char in phrase if char.isalnum())
18-
reversedString = "".join(reversed(string))
17+
string = phrase.lower()
18+
reversedString = reversed(string)
1919

2020
if string == reversedString:
2121
print("\nWow!, The phrase is a Palindrome!")

0 commit comments

Comments
 (0)