How is Python code executed?
0:15
Python source code is first compiled into bytecode by the interpreter, which is then executed by the Python virtual machine. The bytecode is cached in pycache directories as pyc files to speed up subsequent imports. This makes Python a hybrid compiled and interpreted language.
docs.python.org