1. The suffix name of a python file can theoretically be arbitrary, but note: when the Python file that is written is to be imported as a module, the prefix must be. py.
So the python file suffix is best known as. py.
2. Different system execution of the py file difference:
A, under Windows, the execution of the py file can be as follows:
CDM--->d:\python3\python 1.py (environment variable not configured)
CMD--->python 1.py (configured environment variable to add Python.exe path to environment variable)
b, under Linux, the implementation of the Py file can be as follows
./2.py such words must be added inside the file:
1 # !/usr/bin/enc python 2 # -*-coding:utf-8-*-
As the above code, the first line is used to declare the Python interpreter used, the second line indicates the code type (if the code contains Chinese, then the line of code in the Python3 is not necessary in the python2, in the case of the code in English is not required this code).
Initial knowledge and variables of Python basic-----(II.)