Question DSA-TP-0035
EasyWhat is the output of this code?
s = "racecar"
i, j = 0, len(s) - 1
ok = True
while i < j:
if s[i] != s[j]:
ok = False
i += 1
j -= 1
print(ok)
- A.
False
- B.
racecar
- C.
Sign up free to see the answer and a step-by-step explanation.