What does this _ _ pycache__ do when python is running?

pycache

Dec.10,2021

the directory where the compiled intermediate results are stored, which contains bytecode files (pyc extension), similar to java's class files, to avoid reparsing those files that have not changed every time.

$ file __pycache__/kNN.cpython-35.pyc 
__pycache__/kNN.cpython-35.pyc: python 3.5 byte-compiled
Menu