I know the difference between a .py and a .pyc file. My question is not about how, but about why Accordin
The way the programs are run is always the same. The compiled code is interpreted.
The way the programs are loaded differs. If there is a current pyc
file, this is taken as the compiled version, so no compile step has to be taken before running the command. Otherwise the py
file is read, the compiler has to compile it (which takes a little time) but then the compiled version in memory is interpreted just like in the other way.