Why does everyone advocate writing scripts in Python? Does Python have any special advantages? I feel as if PHP has no qualitative advantages.
Node.js is asynchronous, so it is more suitable for writing scripts, but Python? Why?
Because I am preparing to write scripts recently, I am struggling with which language to write Python/PHP.
Experienced friends ask for advice.
I think there are probably two reasons:
On the one hand, Python’s own language features are simple, clear and elegant.
Many scripting languages need to write some small tools to solve problems, and do not care much about performance. This kind of language is easy to use, so it is often used.
On the one hand, it may be due to Python’s perfect third-party library. For example:
In the field of scientific computing, there are: Matplotlib, SciPy, NumPy
In the field of image processing: PIL
In the field of webpage analysis, there are: BeautifulSoup
These third-party libraries all enable programs to get twice the result with half the effort when writing scripts.