W WolfCode · CSC 141

Palindrome Check

回文判断

≈ 20 min · python-strings · Open in WolfCode

Two lines. Normalize first, then compare to the reverse. [::-1] is the standard reverse-slice idiom.

Python · runnable

Normalizing — keep only letters

The build-from-chars idiom