Since 2015, the country has been slowly exposed to Python. Since 2016, Python has become more popular in the country. At present, it can be regarded as “Python for the whole people”.
As we all know, Python is already in the textbooks of primary school students, and the national second-level computer certificate also needs to learn Python!
Because Python is simple and fast to get started, it is the language of choice for many programmers to get started.
If you want to learn Python, or you are just starting to learn Python, then you may ask: “What can I do with Python?””
This question is not easy to answer, because Python has many uses.
But over time, I found that Python mainly has the following five main applications:
1. Web development
The birth history of Python is earlier than that of the Web. Since Python is an interpreted script language with high development efficiency, it is very suitable for Web development.
Python has hundreds of Web development frameworks and many mature template technologies. Choosing Python to develop Web applications is not only efficient in development, but also fast in operation.
Commonly used web development frameworks are: Django, Flask, Tornado, etc.
Many well-known Internet companies use python as the main development language: Douban, Zhihu, <url>, Google, NASA, YouTube, Facebook……
Due to the versatility of the background server, in addition to narrow websites, the server side of many apps and games is also implemented in Python.
2. Web crawler
Many people’s enthusiasm for programming began with curiosity and finally stagnated.
There is a technical gap from practical development, and no one can point to it, and I don’t know if I can do it at the current level? In such a cycle of doubts, programming skills can’t stop, and reptile is one of the best advanced directions.
Web crawlers are a more commonly used scenario for Python. Internationally, Google used the Python language extensively as the basis for Web crawlers in the early days, which led to the application development of the entire Python language. In the past, many people in China used collectors to search for online content, but now it is much easier to use Python to collect online information than before, such as:
Crawl product discount information from major websites and compare to get the best choice;
Collect and classify speeches on social networks, generate emotional maps, and analyze language habits;
Crawl all comments on a certain type of song on Netease Cloud Music to generate a word cloud;
Filter the movie book information obtained by Douban by criteria and generate a form……
There are too many applications. After learning reptiles, almost everyone can do some fun, interesting and useful things through reptiles.
3. Artificial Intelligence (AI)
Artificial intelligence is a very hot direction now, and the AI boom has filled the future of the Python language with unlimited potential. Most of the very influential AI frameworks released now are Python implementations. Why?
Because Python has many libraries that are very convenient for artificial intelligence, such as numpy, scipy for numerical calculations, sklearn for machine learning, pybrain for neural networks, and matplotlib for data visualization. In the field of artificial intelligence, data mining, machine learning, neural networks, deep learning, etc. are all mainstream programming languages, which are widely supported and used.
Most of the core algorithms of artificial intelligence still rely on C/C++, because they are computationally intensive and require very fine optimization. They also require GPUs, dedicated hardware and other interfaces, which only C/C++ can do.
Python is the API binding of these libraries. Python is used because of the glue language characteristics of CPython. To develop a cross-language interface from other languages to C/C++, Python is the easiest, and the threshold is much lower than that of other languages, especially when using Cython.
Fourth, data analysis
In terms of data analysis and processing, Python has a very complete ecological environment. For distributed computing, data visualization, database operations, etc. involved in “big data” analysis, there are mature modules in Python that can choose to complete their functions. For both Hadoop-MapReduce and Spark, Python can be used directly to complete the computational logic, which is very convenient for both data scientists and data engineers.
4. Automated Operation and Maintenance
Python also has very important uses for server operation and maintenance. Since almost all Linux distributions currently come with a Python interpreter, using Python scripts for batch file deployment and operation adjustments has become a very good choice on Linux servers. Python also contains many convenient tools, from paramiko for regulating ssh/sftp, to supervisor for monitoring services, to build tools such as bazel, and even package management tools such as conan for C++. Python provides a comprehensive set of tools, and on this basis, combined with the Web, it will become very simple to develop tools that are convenient for operation and maintenance.
5. Examples of Other Applications of Python
System programming: Provides an API to facilitate system maintenance and management. It is one of the iconic languages under Linux and is an ideal programming tool for many system administrators.
Graphics processing: It is supported by graphics libraries such as PIL and Tkinter, which can facilitate graphics processing.
Mathematical processing: The NumPy extension provides a large number of interfaces with many standard mathematical libraries.
Text processing: The re module provided by Python can support regular expressions, as well as SGML and XML analysis modules. Many programmers use Python to develop XML programs.
Database programming: Programmers can communicate with databases such as MicrosoftSQLServer, Oracle, Sybase, DB2, MySQL, SQLite, etc. through modules that follow the PythonDB-API (database application programming interface) specification.Python comes with a Gadfly module, which provides a complete SQL environment.
Network programming: Provides a wealth of modules to support sockets programming, which can easily and quickly develop distributed applications. Many large-scale software development programs such as Zope, Mnet and BitTorrent.Google is using it extensively.
Web programming: The development language of the application, which supports the latest XML technology.
Multimedia applications: Python’s PyOpenGL module encapsulates the “OpenGL application programming interface”, which can perform two-dimensional and three-dimensional image processing. The PyGame module can be used to write game software.
Hacker programming: Python has a hack library with built-in functions that you are familiar with or unfamiliar with, but it lacks a sense of accomplishment.
Summary:
Seeing so many application scenarios, do you think Python is very powerful, but Python usually does not appear as an engineering language, in other words, formal software production does not use it, mainly using java, c#, xml, c, as for why, because this is the need of software engineering.
Moreover, Python does not have a complete grammar check, but this does not affect Python’s current status, because Python is fast to get started, simple, and relatively low learning cost. There are a wealth of support libraries that can be directly called to efficiently complete the work of different needs, so more and more people are beginning to join the Python army.
Python’s simple and easy-to-understand syntax makes Python the most suitable language for beginners. Even if you are not a programmer, learning Python can greatly improve work efficiency.