Is Python a compiled language or an interpreted language?

Thanks, @steven.daprano. Your explanation is very educative.

compilers sometimes have a built-in interpreter.

Reminds me of Java, which has jshell as its REPL.

Python and Java both have “bytecode”, though they treat it in vastly different ways.