当前位置:网站首页>Python zero basics tutorial (01)

Python zero basics tutorial (01)

2020-11-09 10:53:00 Autumn maple

Serious , I haven't written courseware for a long time . It may not be so smooth . I hope you can give me more advice and criticism . Serious , I haven't written courseware for a long time . It may not be so smooth . I hope you can give me more advice and criticism .
If you like to program, you can add some Q Group 867067945, You can get free learning materials when you join the group , There are big men in the group to answer your questions !
Python How did you get it ?
Python Founded by Guido · Van rosum (Guido van Rossum).1989 Christmas period of , Guido · Van Rossum is spending his time in Amsterdam , Determined to develop a new script interpreter , As ABC An inheritance of language . Abreast of the times TIOBE Ranking List ,Python Has occupied the third place in the world ,Python Advocating beauty 、 Simple 、 Clear , Is an excellent and widely used language .

It's necessary to say Python Naming problem of . Python The name actually comes from Guido( Uncle GUI ) Favorite TV series Monty Python’s Flying Circus. It's almost the same with foreigners , Call what you think of . There is no structure at all , Remember learning Java When , There's a framework called Hibernate, It's meant to hibernate , One more Spring, It means hot spring or spring . There are many more of them , such as android The name of each generation's version is food . So! , Name this thing . It's true. There's no rules . It's like a line in a sketch “ My name is gouzuo. Who did I go to ? It's better to be a loser ”.

Python What can I do ?
That's a good question . I don't know what to do with it , Bai Xue !
python The first thing I'm good at is automatic operation and maintenance ( Required course of operation and maintenance major ), Once one of my students was an operation and maintenance engineer of Tencent , One has to manage 3000+ The server . If you do it by hand , It's going to kill you . With python Add some shell Easy to handle .
python The second area I'm good at is reptiles .python It's a scripting language .“ Simple ” It's the best thing about it . Maybe in a few words you can get a good little crawler . This is also python One of the skills of settling down .
python The third area I'm good at is data analysis . Traditional data analysis uses tableau and excel Mainly , With Python Blessing , Data analysis can be fully automated . Twice the result with half the effort is also .
python The fourth area I'm good at is machine learning and artificial intelligence, which are very popular in recent years . Why does the rise of artificial intelligence drive python Well ? This brings us back to the essence of artificial intelligence . We know that the essence of computers is mathematics , Machine learning needs to apply a lot of difficult mathematical formulas . Early artificial intelligence was not computer science . It's more of a big math guy . That's the question , Mathematics , It is a difficult problem to apply the mathematical formula to the computer . I used to use MATLAB The big math guy who does math finds that it doesn't seem to be efficient . So they tried other programming languages . as everyone knows ,python Grammar is the easiest to use . Plus python Many excellent third-party modules let these guys who usually do math taste sweet . It makes sense ,python It has become the preferred language in the field of artificial intelligence .
however , Here, for the sake of Xiaobai people, I want to talk more about losing it ,python Although suitable for artificial intelligence , But it doesn't mean that other languages are not competent for machine learning . It doesn't mean that artificial intelligence is very easy . After all, most people fail in math .
Here I want to solemnly say a word to Xiaobai people : Little white white people don't come up and engage in artificial intelligence .
python The last area I'm good at is actually a little far fetched , But it's really an area . Namely pythonweb. With Django,Flask,Sanic And so on ,Python stay web And there are some achievements in the direction . however , There is one saying. . Do big web service , still Java More suitable . Have done Django You should be able to see ,Django There are so many functions that the principles and ideas come from Java Of Servlet and Hibernate. And it's not as comfortable as others . and Flask and Sanic Not much . Set up a springMVC Of Python It's just a framework . The most important thing is that the efficiency is not high yet . Do you think this thing is irrelevant .
The reason Pythonweb There are so many problems , I still summarize it as an important area , Because there are some companies using it in China Pythonweb To develop web application . That's it .
interpreted ? A compiled ?
Originally? , I don't want to say that . Because whatever it is , It doesn't mean much to Xiaobai who just started .
First , Programming languages are generally divided into three categories according to their running processes .
The first category : interpreted
interpreted : Write the code to the interpreter , The interpreter interprets and runs line by line . Because the program is running on the interpreter , All interaction with the operating system is left to the interpreter . So for different operating systems, you just need to provide different interpreters . Therefore, interpretive languages often have good cross platform features .–> Baidu should be said that . Look first , I'll explain it later .
The second category : A compiled
A compiled : Written code needs to be compiled by the compiler . And then take the compiled results to execute , Typical is what we're going to use QQ, Thunderbolt etc. . They have a unified problem , Due to the use of writing programs, many operating system function libraries are called , As a result, the compiled content can only be executed on the current operating system . It won't work if you get other platforms ( Other platforms may not have these libraries ).
The third category : Compile first and then explain .
Compile first and then explain : This is very easy , First compile it into xxx, Then take xxx Go to the interpreter to execute . You can think of it as a compromise between the advantages and disadvantages of the two types above
Performance differences : Let's first understand , No matter what type , We have to turn our written code into 01 The machine code is then handed over to the computer for execution . So here's the problem . Interpretive languages are executed line by line , That is to say, read a line , Translation line , And then execute . Every line has to be like this . Efficiency is conceivable ... And compiler , You can think of it as a one-time translation 01 Machine code , Then every time you execute it, you can take the translated machine code , Its efficiency must be much higher than that of interpretive language . Unfortunately python Is an interpretive programming language . That's what a lot of big guys always say python An important factor in low efficiency . and C Language is a typical compiler language , So he's efficient . So it's good for doing some lower level work on the operating system .
You may have doubts about this ,python It's so slow to learn ?No! Don't worry about it , The so-called slow also has to have the contrast . For example, a program uses C To write that it may take 0.00001 second ,python slow 100 times , So is that 0.001 second ,0.001 Seconds for you , I don't seem to feel anything . Besides, , For some special scenes ( Reptiles ) We have to slow down the program . Otherwise it's easy to seal IP All right . What do you mean by this ? It's called Wen Dao , There are specialized skills . No best , Only the best fit !
All right , This is the first one . There are programming problems , Feel free to write or comment on ...
If you like to program, you can add some Q Group 867067945, You can get free learning materials when you join the group , There are big men in the group to answer your questions !

版权声明
本文为[Autumn maple]所创,转载请带上原文链接,感谢