diff --git a/Python/palindrome.py b/Python/palindrome.py new file mode 100644 index 0000000..444aa73 --- /dev/null +++ b/Python/palindrome.py @@ -0,0 +1,7 @@ +word = input("enter word: ") +word = word.casefold() +reverse_word = reversed(word) +if list(word) == list(reverse_word): + print("The string is a palindrome.") +else: + print("The string is not a palindrome.")