What is Python?

What are the features of Python?

Python is especially easy to get started with its relatively few keywords, simple structure, and extremely simple syntax. Simple, efficient. This means that a few lines of Python can do what a dozen lines of other programming languages can do for the same task. Let’s do a comparison with python and C++ as follows:

Python:

1 #! /usr/bin/python


2 a = 0


3 while(a <= 10):


4 a = a + 1


5 print ‘The number is ‘+a


6 print ‘while is end’

C++:

1 #include


2 int main()


3 {


4 int a = 0;


5 while( a <= 10)


6 {


7 a = a + 1;


8 cout<<“The number is “<<a<<endl;


9}


10 cout < < “while is the end” < < endl;


11}

Rich standard and third-party libraries. One of Python’s greatest strengths is its cross-platform rich library, which is well compatible with UNIX, Windows, and Macintosh.

Object oriented. Python is an object-oriented programming language. Python supports an object-oriented style or programming technique in which code is wrapped in objects. Python has many third-party libraries, such as Numby and Pandas, that can be called directly.

Cross-platform, portability. Due to its open source nature, Python has been ported to many platforms and can run on many systems, such as Windows, Linux, FreeBSD, Macintosh… And so on.

Powerful. Python can do everything from web crawler, data analysis and calculation, data visualization to Web development, artificial intelligence, automated test operation and maintenance.

1. Where is Python used?

Since Python was invented by Guido van Rossum in late 1989, there have been thousands of websites and software projects based on the technology.

Python stands out among programming languages because of its uniqueness and has a large number of programmers around the world who support it.

What are the advantages of Python?

Simple, free, compatible, object-oriented, function library

Where to use Python? Crawler Web development desktop development scientific computing image processing artificial intelligence


“, and a variety of other directions Python can handle.


For someone who has never written code in the future, Python code is concise and easy to understand.


It is for this reason that Python is friendlier than other languages.


Also, programs written in Python are highly maintainable, which can greatly reduce development costs and increase programmer productivity from a business perspective.

Python vs other languages (here we compare with PHP)Python vs PHP

From a developmental point of view, PHP is a web-oriented language.


A PHP application is more like a set of separate scripts and may even have a single semantic entry point.


Correspondingly, Python is a multipurpose language that can also be used for Web development.


A Python-based Web application is a full-fledged application that loads its internal state, from queries to requests, into memory.

Web development comparison between Python and PHP 1. Popularity

Now, to be in line with trends or trends,


Some customers and product owners only want to use the most popular and popular technologies in their projects


In this case, if you focus on development but ignore the technical direction, you may end up with no customers and no jobs.


That is to say,


Before you learn anything, make sure it’s relevant 1, 5, or even 10 years from now.


PHP and Python are among the most popular programming languages in the world, so don’t worry.

PHP is used to build Wikipedia, Yahoo, WordPress, Friendster, MailChimp, Flickr, and many more giants. Python is used to build YouTube, Instagram, the desktop version of Dropbox, Reddit, Bitbucket, Quora, Spotify, Pinterest, Facebook’s internal services, and PayPal! 2. Architecture Tools are also important in your choice of technology.

It defines the simplicity and convenience of your work

If a technology provides multiple tools for different tasks, the programmer can be assured that he doesn’t have to do everything from scratch.

The most popular PHP frameworks are Laravel, Symfony, CodeIgniter, Yii 1 and 2, Phalcon, etc.

These tools can help you create powerful and clean applications.

Python, on the other hand, can’t boast so many frameworks, using Django and Flask the most.

But we can assure you

As the Python community continues to evolve, it’s hard to see this changing anytime soon.

2, learning,

This is usually the first question anyone who wants to learn how to program wants to figure out

The easier the learning process, the faster they can start working and earning money

Of course, the winner in this category is Python, whose syntax is much simpler to learn.

While PHP takes more time and effort to master, Python allows you to make almost no errors with no code breaks,

So Python gives beginners more confidence to continue learning.

From a beginner/novice point of view, Python is ideal if you want a simpler, more flexible programming language

Python allows you to create secure applications, whereas PHP requires additional tools for this purpose. PHP was created specifically for Web development, and is used more in this area.

Is Java or Python better?

Some developers claim that Python is more productive than Java, but it should be noted first: What is the difference between Python and Java?

Java is a typified programming language, which means variable names must be declared.

By contrast

We have dynamically typed Python, which doesn’t require declaring variables, and there’s a lot of debate about dynamic versus static typing in programming languages.

But note this feature:

Python is a diverse language with simple syntax. This makes Python widely used for scripting, rapid application development, and so on.


Java supports cross-platform applications, while Python is compatible with almost all modern operating systems,


Java is much more complex for beginners than Python, and reading Python code is much easier than reading Java code,


If you want your code to run anywhere, choose Java; Another advantage of Java is the ability to build web-based applications.


Java is much more complex than Python. Learning Java can be a tough process if you don’t have a technical background;


On the other side


Java can be used in different environments, so if that’s what you need, go with Java.

What is the future of Python?

The following data comes from recruitment websites such as Zhaopin.com, Kanzhon.com, Laigou, 51job.com and Chinahr.com

As Python continues to grow in popularity

Demand for Python technical talent is also on the rise — up to 15,000 per day

The demand of first-tier cities such as Beijing, Shanghai, Guangzhou and Shenzhen is huge.

In terms of salary, Python does not disappoint.

Through the analysis of 12,809 sample data from the whole country, it can be found

The average monthly salary of Python engineers nationwide can reach 19,160 yuan,

Among them, the number of 20-30K engineers is more than 40%.

Although salaries vary slightly from city to city

But it does send a message that if you want to make millions of dollars a year, get rich overnight and succeed in life,

Compare Java, C, C++ and other older languages

Python is a great try. Do you want to marry Bai Fumei? Do you want to be CEO? Do you want to get rich overnight? Learn Python.) Learn more about The Python language

From the above data:

If you can only learn one language, you have no choice but to learn Python.

Both for beginners and developers with other programming experience

According to years of Python experience, Python mainly has the following four major applications: Web crawler website development artificial intelligence automatic operation and maintenance

Let me talk to you about these aspects:

First, web crawler

First of all,

What is a web crawler?

Web crawler, also known as web spider, refers to a script program that crawls the required content on the network according to certain rules. As we all know, each web page usually contains the entrance of other web pages, and the web crawler enters the other web sites to obtain the required content.

What is the use of a reptile?

Do vertical search engines (Google, Baidu, etc.).

Scientific research: Empirical research in online human behavior, online community evolution, human dynamics research, econometric sociology, complex network, data mining and other fields requires a large amount of data, and web crawler is a powerful tool to collect relevant data.

Snooping, hacking, spam…

Crawlers are the first and easiest step for search engines.

In what language is a crawler written?

C, C + +. High efficiency, fast, suitable for general search engines to do the whole network crawl. Cons, slow development, smelly and long to write, e.g. Skynet search source code.

Scripting languages: Perl, Python, Java, Ruby. Simple, easy to learn, good text processing can facilitate the detailed extraction of web content, but the efficiency is often not high, suitable for a small number of websites focused crawling

Second, website development

So what do you need to know to develop a website?

1. Basic Knowledge of Python, developed in Python, so Python must be able to, at the very least, you must be able to judge conditions, loops, functions, classes and so on;

2, HTML, CSS basic knowledge, because to develop web sites, web pages are WRITTEN HTML and CSS, at least these knowledge you will, even if not write front-end, not to develop a particularly beautiful page, website, at least to be able to understand HTML tags is;

3, database basic knowledge, because the development of a website, where the data exists, is in the database, then you will at least add, delete, change and check the database, otherwise how to save data, take data

If the above knowledge is able to develop a simple site is no problem, if you want to develop a larger site, business logic is more complex, it needs to use other knowledge, such as Redis, MQ, etc.

Artificial intelligence

Artificial Intelligence, or AI for short. It is a new technical science to research and develop the theory, method, technology and application system for simulating, extending and expanding human intelligence. Artificial intelligence is a branch of computer science that seeks to understand the nature of intelligence and produce a new type of intelligent machine that can react in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. Since the birth of artificial intelligence, the theory and technology are increasingly mature, and the application field is also expanding. It can be assumed that the future scientific and technological products brought by artificial intelligence will be the “container” of human intelligence, and may even surpass human intelligence. Python is becoming the language of machine learning. Most machine language courses are written in Python, and Python is used by a large number of large companies, leading many to believe that it is the major programming language of the future.

Some people think Python is inefficient and say it can’t support multithreading. Well, that’s a bit true, but HOW many of you reading this have done search engine development? How many do a hundred million PV concurrent website development? How many of you have read the LINUX kernel source code? If not, learn the language first

Iv. Automated operation and maintenance

Python can meet most of the requirements for automated operations, back-end C/S architecture, and the ability to quickly develop a sophisticated WEB interface using a WEB framework. You will only be valuable if you can build an automated operation system yourself.