Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cbbb12

Browse files
authored
str
1 parent 8449b86 commit 6cbbb12

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Functions/palindrome.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def is_palindrome(string):
2+
length = len(string)
3+
for i in range(length // 2):
4+
if string[i] != string[length - i - 1]:
5+
return "Not Palindrome"
6+
return "Palindrome"
7+
8+
string = input()
9+
print(is_palindrome(string))

0 commit comments

Comments
 (0)