Article #015
In today's article, we will have a brief discussion on compiled and interpreted language. We will try to understand whether Python is compiled language or interpreted language. First, we need to understand the basic difference between the two.
A compiled language reads the high-level language and converts it to machine language. The compilation is done all at once. Thus, the time consumption is less but CPU utilization is more.
An interpreted language skips the process of translating the high-level language to machine language. It directly executes the code line by line. Here, the overall time consumption is more but CPU utilization is less.
Python acts as both compiler and interpreter. When we execute our code, it is first compiled into byte code. Now the code is interpreted line by line by the python virtual machine(p.v.m) and then executed accordingly. Thus, we can say that Python is both compiled as well as interpreted language.
Hope the above explanation is helpful in better understanding of the topic.