the-honk/gcse computer science/year 10/string iteration - pallindrome checkers/Pallindrome Checker.py
2021-05-28 21:38:55 +01:00

9 lines
No EOL
214 B
Python

word = input('Please enter a word!')
def isPallindrome(x):
return x == x[::-1]
if isPallindrome(word):
print('{0} is a pallindrome!'.format(word))
else:
print('{0} is not a pallindrome!'.format(word))