Best afterA comparison is a yes/no value·Filtering a list

Palindrome check

A palindrome reads the same forwards and backwards. Checking one means pairing the first letter with the last, the second with the second-to-last, and so on — and it is easy to pair the wrong letters.

Decide whether a word reads the same forwards and backwards.

Palindrome — comparing the wrong pair execution-derived · CPython
variables
state after line 1 runs
variablevalue
s"racecar"
step 1 / 12

Click a line, drag the slider, or use the keys.

What you are looking at

Watch is_palindrome as i walks the first half of the word.

This is a milestone — it puts several earlier ideas together into one small program.

Every state you see came from running the program under CPython's tracer at build time — see how GlassBox stays honest.