Is Python compiled or interpreted?

Python basics · Freshers

Model answer

Both, in a sense. CPython compiles your source to bytecode and then runs that bytecode in a virtual machine, so it feels interpreted. This is why you can run code line by line in the REPL. Other implementations such as PyPy use a just-in-time compiler.

Learn this topic

What Is Python? Install It and Write Your First Program in the course Python for Beginners: Learn to Code with Real Projects.

Sign in to add your own answer.

More questions