Skip to content

Instantly share code, notes, and snippets.

View naveen521kk's full-sized avatar
💭
Focusing!

Naveen M K naveen521kk

💭
Focusing!
View GitHub Profile
@naveen521kk
naveen521kk / palindrome.py
Created October 1, 2019 14:08
To check palindrome loops.
#To check whether a string is a palindrome or not.
s=input('Enter a word')
l=len(s)
mid=l//2
rev=-1
for a in range(l):
if s[a]==s[rev]:
rev-=1
else:
print("not a palindrome")