All Courses

How Python interpreter Works?

By Sajid, 2 years ago
  • Bookmark

Is python an interpreter language? how python program executes?

1 Answer

Python is a interpreter language.Python interpreter execute program line by line.

The Python interpreter performs following tasks to execute a Python program :

  1. The python code is compiled into python byte code, which creates file with extension .pyc .It checks the syntax of each line if any error throws an error immediately.
  2. Compilation is simply a translation step, and byte code is a lower-level, and platform-independent representation of your source code.Each of your source statements is translated into a group of byte code instructions.
  3. The .pyc file , created in compilation step, is then executed by appropriate Python virtual machines.
  4. The Virtual Machine is the runtime engine of Python and it is always present as part of the Python system, and is the component that truly runs the Python scripts .

Your Answer


Why You Should Learn Data Science in 2023?

Jun 8th (7:00 PM) 289 Registered
More webinars

Related Discussions

Running random forest algorithm with one variable

View More