Python and JavaScript String Explorer

Enter text, choose an operation, and see what the language actually does.

No account needed. Text stays in browser memory: no uploads, saved inputs, or share links. Python loads only when you run it.

Choose an operation, then press Run. The first Python run may take a moment to load.

Result

Run an operation to see its result.

Equivalent code

String indices

Run to inspect the first 128 character units. Visible characters may span multiple units.

IndexUnit (quoted)

Try this example

Trimming " Café 😀, café " produces "Café 😀, café" in both languages. Python uses text.strip(); JavaScript uses text.trim(). Then compare length or slice: JavaScript counts the emoji as two UTF-16 units.

What each operation means

Results are limited to 100,000 characters. Lists show their first 100 items; index views show their first 128 units. Search is literal and case-sensitive.

Free Python practice · Free JavaScript practice · Explore courses

Reset String Explorer?

This clears your text and results and stops any running operation.