Lets deep diver into python inner working!!

So to start the topic first, we need to understand a couple of things
1st Python is a interpreted language not a compiled language.
2nd Make a file in python then make a function a function in it create another file and import the function created in the first file to it and call it. So, when you will run that python script so a new folder will be created by the name __pycache__ and there will be a file in it named your_first_file.cypthon-311.pyc (the number here differs beacuse it represent the python version).

So the question is what is this file and folder.
For that we need to understand the execution of the python code how the code is implemented.
When we run the code, the script file is converted into byte-code.
The python interpreter converts the code to byte-code.
So the folder and the file which is mentioned above is nothing but the byte-code.
The byte-code file is mostly hidden in case of top level files when no function or method is imported form another file.
But it appears when files are imported.

Reference for this is --> https://www.youtube.com/watch?v=3HTKc-ZgZbg

Thank You!!!