Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Check Palindrome/16123004.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
s = raw_input()
def is_palindrome(c):
j=''
for o in c:
j=o+j
if(j==c):
print("Its a palindrome")
else:
print("Its not a palindrome")

n = len(s)

palin = True
for i in n/2:
if s[i] != s[-(i+1)]:
palin = False

if palin:
print("Palindrome")
else:
print("Not Palindrome")

is_palindrome('racecar')
is_palindrome('poppy')