Backlucerna← Collection

print — what happens before it reaches the screen?

pythonStandard output and buffering
Source code
print("")
❯ Try editing the highlighted part of the code above
Edit the "…" in the code above. "A" = 1 byte, "é" = 2 bytes, "あ" = 3 bytes, an emoji = 4 bytes ── the UTF-8 shape changes.
Memory / executionStep 1 / 6
👁 What you can see ── text appeared on the screen
Running print("café") shows café on the screen. That’s all the writer sees. But behind the scenes, this text is handed to the “window for the screen” (standard output), then passes through several stages (turn characters into bytes → hold them briefly → send them out) before reaching the screen. Steps ②–⑤ open up that process one layer at a time (the names of the functions called inside are under “🔬 Look closer” below).
Use ← → keys too

Other pieces

One step beneath “it works.”

Backlucerna · Phase 1 MVP · Astro + React island