I am writing a function to check if a word is a palindrome
def palidrome(b):
word = ''.join(reversed(b))
if b == word:
return True
return False
def main():
so = input("Please enter a matching word")
come = palidrome(so)
print(come)
main()
Whatever I put, e.g., 'mom,' 'dad' or 'racecar,' it always outputs False
but it should be True
.