5 Python Interpreter Tricky Questions

Python is an interpreter, and it does not need a compiler. The interpreter's responsibility is to execute the program. When it first encounters a python program of the .py module, it converts it to Bytecode, which is portable and it is a one-time job.

Tricky Interview Question: How Interpreter different from Compiler.

Byte code is in the form of '00001111000111'. So it is zeros and ones. Where it differs? When you compare it to other Languages. It is a little tricky. You May Also Like: Bytecode Vs Machine Code

Internal Mechanism

Internally, the Python interpreter converts source-code to byte-code when you first execute it. So to run Python-program, you need an interpreter installed on your machine.

5 Python Interpreter Tricky Questions
Execution flow of Interpreter

To execute a Python program you need the below two:

  1. Interpreter
  2. Libraries


The process of the interpreter is BlackBox to the programmer. The interpreter creates a .pyc module, which is input to PVM, and to use in next time processing.

The PVM (Python Virtual Machine) is just like JVM in Java, a run-time environment, which executes Byte-code and gives you output. Here are 4 Python Oops Concepts.


During Python installation, you will find wide variety of libraries installed. You can't say, it is a particular one, all the libraries will install. To work Python interpreter, you need all these.

Python Byte-code



Popular posts from this blog

Hyperledger Fabric: 20 Real Interview Questions

How to Fix Python Syntax Errors Quickly

5 Super SEO Blogger Tools