Value #! in python separately

I could add #! / Usr / bin / python at the beginning of the python script and add this script to PATH to run it as a command.

But can someone explain to me what “#” and “!” Do? mean separately in python and what other language has this mechanism? Thanks

+4
source share
2 answers

This is a shebang string and #! magic numbers that are interpreted by the program loader on unix systems and are used to run the script interpreter.

+1
source

#, - ; Python, . Unix, , /usr/bin/python, , .

+1

All Articles