String Palindromes
Start Timer
0:00:00
Given a string, write a function to determine if it is palindrome or not.
Note: A palindrome is a word/string that is read the same way forward as it is backward, e.g. 'reviver', 'madam', 'deified' and 'civic' are all palindromes, while 'tree', 'music' and 'person' are not palindromes.
Example:
Input:
word1 = "tree"
word2 = "radar"
Output:
def is_palindrome(word1) -> False
def is_palindrome(word2) -> True
.
.
.
.
.
.
.
.
.
Comments