Check if string is palindrome on the Python language

Member

zora.stokes

by zora.stokes , in category: Python , a month ago

Check if string is palindrome on the Python language

1
2
3
4
5
6
7
8
def ispalindrome(string):
	decide=1
	i=0
	while i<=int(len(string)/2) and decide==1:
		if string[i]!=string[-(i+1)]:
			decide=0
		i+=1
	return decide


Facebook Twitter LinkedIn Telegram Whatsapp Pocket

no answers