Python Inner Working how program exicutes

Python Inner working:

Step 1: The Python script is compiled into bytecode. Here, "compilation" refers to the process within Python's internal workings. The bytecode generated is not directly understandable by the machine; rather, it is meant for internal use by the Python Virtual Machine (PVM). The compiled script is saved in either .pyc or .pyo format. Bytecode execution typically runs faster than executing the original .py script.

Step 2: The bytecode is fetched into the Python Virtual Machine (PVM), also known as the Python runtime engine or interpreter.

Step 3: The Python interpreter converts the bytecode into a machine-understandable format, which consists of binary 0's and 1's. This format is highly optimized for machine (CPU)

Step 4: In the last step, the final execution occurs where the CPU executes the machine code and the final desired output will come as according to your program