Anjum
asked

Expert
Abhay Jajodia answered
Hi Anjum Javed,
A compiler translates your whole program into machine code first, then you run the compiled program. This is common in languages like C and C++.
An interpreter runs your code by reading it and executing it step by step, so you can run your program right away without a separate build step.
Python is often called interpreted because you usually run .py files directly using the Python interpreter. One extra detail that helps: Python first converts your code into bytecode, then the Python interpreter runs that bytecode for you. So you still get the simple run-it-now experience.
If you have more questions, I am here to help 😊
Python
This question was asked as part of the Getting started with Python course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer