Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Palindrome_check_using_recursion
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
word = input("ENTER WORD: ")
word = list(word)
print(word)



def is_palindrome(word):
if len(word) == 0 or len(word) == 1:
return True
elif word.pop(0) != word.pop():
return False
else:
return is_palindrome(word)


print("Is Palindrome: ", is_palindrome(word))