Python Forum

Full Version: Is python an interpreted language or a compiled language?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So im a newbie in python and i learnt that python is an interpreted language since pvm interprets the byte code , but the byte code is instead formed after compiling the python source file. So is python both compiled and interpreted language?
I would say yes because the python language is translated into another language, the bytecode, and translating one language into another is what a compiler does, but the bytecode is interpreted by a virtual machine, so python is also interpreted.

The confusion comes from the fact that the word 'compiler' has often be used as a synonym for a program that translates a language into machine code directly executable by a CPU. Obviously python is not compiled in this restrictive sense in the way that C is for example.