Can Python be compiled? is it compiled or interpreted?
Published September 24, 2019 By
mustapha
Can Python be compiled or in other words: is Python compiled or interpreted language?
To save you a few minutes the answer is straightforward which is both: python is compiled as well as interpreted language.
But hold on, when you read some books or when you read some articles on internet, they tell you that python is an interpreted language.
Why so? and why I’m saying Python is compiled or integrated language? Let’s find out in this article
Yes, Python is compiled and interpreted language
So let’s see why Python is both compiled and interpreted language.
First let’s find out what is a compiler or when do you say a language is a compiled language: we have so many programming languages like C++ Python, Java and many more.
When it comes to C and C++ they are compiled languages because you, as a programmer, you write a C program here is C code, these are high level languages. This simply means your machine cannot understand these languages. because by default computer works only on machine language.
This means when you write a code is in C language you have to convert that code into a machine language and that’s where compiler comes to the picture.
For example if you want to eat in a dish, let’s say if you want to eat dosa, you have a concept in mind of how dosa looks like.
Then if you go to different restaurants they have a different way of serving it and now we have different versions of dosa.
In the same way for Python is a language and then we have different implementation we have CPython, PyPy, IronPython and Jython.
Basically when you talk about CPython it is implemented in C language. That means that the internal working is happening with C language.
On the other hand when you say Jython, which is Java somewhere, the implementation is done using Java language, then we have the dotnet version of it which is IronPython which is the dotnet implementation of it.
There is one language and we have different implementations but in general the widely used implementation is CPython.
A Piece Of Advice
I would also suggest you to have a look on this other stuff as well .
Just to give you a summary whatever we have discussed till now what is Python its it’s a compiled and interpreted language.
Even if you are not compiling it, behind the scene it’s happening so it is getting compiled.
I hope you enjoyed it, please let me know you questions in the comment section and follow me on twitter for your daily Python update.
We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.
Like!! Thank you for publishing this awesome article.
Wow! Thank you! I continuously needed to write on my site something like that. Can I include a part of your post to my site?
We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work.