← The Forge
Fundamentals Lab · Python 1

Python Primer

Same "see it, type it, get confirmed" loop as the bash labs — new interface, though. This runs as one continuous python3 session: variables you create in one exercise are still there a few exercises later, exactly like a real REPL.
Before We Start

Meet the Python REPL.

  • Typing python3 at a bash prompt drops you into a different interface entirely — the Python REPL (Read-Eval-Print Loop). It runs one line of Python at a time and shows you the result immediately, no file needed.
  • Its prompt looks different too: >>> means "ready for a new line." ... means Python is still waiting — you started something (like an if) that isn't finished yet.
  • Click inside the black box below to focus it, same as any terminal. Everything you build stays alive for the rest of this lesson, exactly like a real session.
Done

Five ideas, not fifty rules.

A value, an instruction, a decision, a repeat, borrowed code. Everything else in Python is a variation on one of those five. The dict-inside-a-dict you just pulled a value out of is exactly what a real API hands back — two lessons from now, in the Python API lab, you'll fetch one live and unpack it with these same moves.
1 / 1
ends with a "mark complete" step