Python Logo

Python: Is Palindrome function

def is_palindrome(s): ⏎
	left = 0
	right = len(s) - 1
	while left < right:
		if s[left] != s[right]:
			return False
		left += 1
		right -= 1
	return True
Accuracy
100 %
0 Mistakes
CPM
0
Average: 0 CPM
Time
0.000 s
Personal best: -.--- s