Is Python compiled or interpreted or both? tccicomputercoaching.com
Python code is compiled every time it is imported in a new process to create a .pyc while it is interpreted when directly executed.
Python code (.py files) is compiled to bytecode. Bytecode is machine independent similar to Java Bytecode.
Byte code is then interpreted at runtime to machine code.
When we execute Python code the compilation to bytecode and execution of bytecode automatically happens. That is perhaps one of the reasons that Python is called interpreted language.
To enroll at TCCI
Call us @ 9825618292
Visit us @ http://tccicomputercoaching.com/