I am a beingger for using Python,now I am doing a palindrome program,but I have tried many time it still doenst work, can anyone help me to fix it??Thanks a lot!!!!!
Here is the code:
s=input("Enter alphabetic characters: ")
def palindrome(s):
index=0
c=True
while index<len(s):
if s[index]==s[-1-index]:
index +=1
return True
return False
if palindrome(s)==True:
print ("This is alphabetic characters")
else:
print ("This is not alphabetic characters")