What goes in the blank?
# palindrome check with mirrored indexes
n = len(s)
for i in range(n // 2):
if s[i] != s[n - 1 - ____]:
return False
return True
Answer: i
Index i from the front is mirrored by n - 1 - i from the back.
Play Problem Solving ▸