How is interpretation done in python?
Python is an interpreted language and it uses interpreted programs to convert source code (written by the programmer) into intermediate language and then converted to machine language.
Python codes are written by programmers compiled into bytecode because bytecode is platform-independent and runs faster than our source code and this process of bytecode compilation runs at the backhand. The user would not be able to see this process and at the end of this step .pyc extension file gets created.
Now, this .pyc extension will be executed by Virtual Machine (Part of Python system can say runtime engine). This virtual machine executes bytecode created in compilation one by one to perform operations.