#!/usr/bin/env python This line of comments often appears in the first line of the Python script. What the hell does this line do for?
The reason is simple, and any Python script execution needs to rely on the Python interpreter.
This line of comments tells the computer where to find the Python interpreter. The purpose of the comment is to provide a path to find the Python interpreter.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/usr/bin/env python
When you declare this, you will fetch the first python specified in the PATH of your machine to execute your script.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#!/usr/bin/python
This writing is dead, is to/usr/bin/python this directory python to execute your script. The portability of this program is poor. If the Python interpreter does not exist under this path, an error will be found.
What is #!/usr/bin/env python?