We all know we will save the Python files with .py. This .py file contains the actual source code of the each python program.
The More about the Python .py and .pyc files are below
How Python works?
Simple Python Example
# change this value for a different result
if number < 0:
The sum is 253
If we store this program with the name "sample",then it will be stored as "sample.py" when we run a sample.py file, compiler creates a sample.pyc file once the code is executed it first executes .py file where as code is first turned into byte code by the compiler in the form of "sample.pyc” file
Article Contributed By :