Skip to content

Commit 6416c83

Browse files
authored
Add files via upload
1 parent b4fbba1 commit 6416c83

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

palindrom.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def palindrom(s):
2+
return s == s[::-1]
3+
4+
word = input("Enter a word: ").lower()
5+
if palindrom(word):
6+
print(word, "is a palindrom.")
7+
else:
8+
print(word, "is not a palindrom")

0 commit comments

Comments
 (0)