There are programming languages in the world 600 Varied , But there are at most 20 or 30 kinds of products that are used in the mainstream , Different languages have their own characteristics and areas of expertise , With the continuous development of computers , New languages are coming into being , At the same time, there are many old languages that are slowly becoming useless . There is an authoritative language ranking website , You can see what the mainstream programming languages are !
2022 year 2 Monthly data (https://www.tiobe.com/tiobe-index/ ),python Has been promoted to the first place in the list of programming language use !
Python Direction of employment :
- Web crawler : seeing the name of a thing one thinks of its function , Just use Python Collecting and crawling information from the Internet . Now learn Python A large part of the people in the team are learning to crawl , This is also Python One of the big advantages of , First use Python It's Google that does the web crawler .
- web Development : Python There are many excellent Web Development framework , Such as Flask、Django、Bootstar etc. , Can help you quickly build a website . When a new feature is needed , use Python Just add a few lines of code , This is welcomed by many start-ups . image You know 、 douban Such a large factory , The earliest websites used Python Built .
- Data analysis : In this era , Data is as valuable as gold , Such as : headlines 、 Tiktok and other products are built on user analysis. , Not to mention Taobao 、 JD.COM these “ Customized recommendation ” Old hand . so to speak , All commercial companies need such a role ,Python Data Analyst It has also become one of the hottest occupations at present .Python In the current data analysis business , The most commonly used language .
- Automatic operation and maintenance : O & M Engineer Often monitor the operation of hundreds of machines , Or deployed at the same time . Use Python Can automate batch management of servers , Play a 1 Personal top 10 Personal effects . Automatic operation and maintenance is also Python It is one of the main application directions of , It's in system management 、 There are powerful functions in document management .
- automated testing : The work of testing is boring and repetitive , in the past , Every product update , It's going to have to be tested over and over again , Inefficient and error prone .Python Provides a lot of frameworks for automated testing , Such as Selenium、Pytest etc. , Avoid a lot of duplication of work ,Python Automated testing is also becoming more and more popular .
- Artificial intelligence : Artificial intelligence is one of the most popular directions at present , The salary is very high . You can see it on the recruitment website ,80K、100K There are also a lot of positions for . Of course, these positions also have relatively high requirements for education and technology .
1. Easy to learn :Python There are relatively few keywords , Simple structure , And a clearly defined grammar , It's easier to learn .
2. Easy to read :Python More clearly defined code .
3. Easy to maintain :Python The success is that its source code is fairly easy to maintain .
4. An extensive library of standards :Python One of the biggest advantages of is rich libraries , Cross platform , stay UNIX,Windows and Macintosh Very compatible .
5. Interactive mode : The support of interactive mode , You can input the execution code from the terminal and get the result language , Interactive test and debug code snippets .
6. portable : Based on its open source features ,Python It's been transplanted ( That is to make it work ) To many platforms .
7. Scalable : If you need a piece of critical code that runs fast , Or I want to write some algorithms that don't want to be open , You can use C or C++ Complete that part of the program , And then from your Python Call in program .
8. database :Python Interface to all major business databases .
9.GUI Programming :Python Support GUI Can be created and ported to many system calls .
10. Embeddable : You can take Python Embedded in C/C++ Program , Let users of your program get " scripting " The ability of .
Here I would like to recommend a book for you python Excellent introduction to , It's suitable for people who don't know much about computers , I haven't learned programming , But people who are interested in programming learn to use .
《 Stupid law enforcement Python》(Learn Python The Hard Way, abbreviation LPTHW) yes Zed Shaw A book written by Python Introductory books . This book guides the readers step by step in the way of exercises , From simple printing to the realization of the complete project . Maybe reading this book doesn't mean you've learned programming , But at least you'll have a rudimentary understanding of programming languages and the programming industry .
The features that distinguish this book from other introductory books are as follows :
The structure of this book is very simple , In fact, that is 52 A problem set . among 26 One covers the input and output 、 Variable 、 And function , in addition 26 This one covers some advanced topics , Such as conditional judgment 、 loop 、 Classes and objects 、 Code testing 、 And the realization of the project . The format of each chapter is basically the same ,
Start with code exercises , The reader writes the code according to the instructions ( Copy and paste are not allowed ), Run and check the results , Then do some extra exercises . Of course, if you think the bonus exercise is a little difficult for you , You can also skip , It doesn't matter to finish it later .
Because of the more content of the article , Space is not allowed , Some of the contents not shown are shown in the form of screenshots . If there is a need to obtain complete information documents of friends . Check the image below to get !
Mac OSX 1
OSX: Should see the results 2
Windows 2
Windows: Should see the results 3
Linux 4
Linux: Should see the results 5
A warning for beginners 5
Should see the results 8
Additional exercises 10
Frequently asked questions 11
Should see the results 12
Additional exercises 13
Frequently asked questions 13
Should see the results 15
Additional exercises 15
Frequently asked questions 16
Should see the results 18
Additional exercises 18
Frequently asked questions 18
Should see the results 21
Additional exercises 21
Frequently asked questions 21
Should see the results 24
Additional exercises 24
Frequently asked questions 24
Should see the results 26
Additional exercises 27
Frequently asked questions 27
Should see the results 28
Additional exercises 28
Frequently asked questions 29
Should see the results 30
Additional exercises 31
Frequently asked questions 31
Should see the results 33
Escape sequences 33
Additional exercises 34
Frequently asked questions 34
Should see the results 36
Additional exercises 36
Frequently asked questions 36
Should see the results 37
Additional exercises 38
Frequently asked questions 38
wait a minute !“ characteristic ” There's another name 39
Should see the results 40
Additional exercises 41
Frequently asked questions 41
Should see the results 42
Additional exercises 43
Frequently asked questions 43
Should see the results 46
Additional exercises 46
Frequently asked questions 47
Should see the results 49
Additional exercises 50
Frequently asked questions 50
Should see the results 52
Additional exercises 52
Frequently asked questions 53
Should see the results 55
Additional exercises 56
Frequently asked questions 56
Should see the results 58
Additional exercises 58
Frequently asked questions 59
Should see the results 61
Additional exercises 61
Frequently asked questions 61
Should see the results 64
Additional exercises 64
Frequently asked questions 65
What I learned 66
Should see the results 69
Additional exercises 69
Frequently asked questions 70
Should see the results 72
Additional exercises 73
Frequently asked questions 74
Frequently asked questions 75
Logical terms 76
Truth table 77
Frequently asked questions 78
Should see the results 80
Additional exercises 81
Frequently asked questions 81
Should see the results 83
Additional exercises 83
Frequently asked questions 83
Should see the results 85
Additional exercises 85
Frequently asked questions 85
Should see the results 87
Additional exercises 87
Frequently asked questions 87
Should see the results 90
Additional exercises 91
Frequently asked questions 91
Should see the results 94
Additional exercises 94
Frequently asked questions 95
Additional exercises 97
Should see the results 100
Additional exercises 100
Frequently asked questions 100
if Rules for statements 102
The rules of the cycle 102
Debugging tips 103
homework 103
keyword 104
data type 105
String escape sequence 105
String formatting 106
The operator 106
Reading the code 107
Additional exercises 108
Frequently asked questions 108
Should see the results 111
Additional exercises 111
Frequently asked questions 112
Should see the results 116
Additional exercises 116
Frequently asked questions 117
Modules are similar to dictionaries 118
Classes are similar to modules 119
Object is equivalent to mini import 120
Get what is contained in something 121
The first example of a class 121
Should see the results 122
Additional exercises 122
Frequently asked questions 123
Word practice 124
Vocabulary Practice 124
Mix consolidation exercises 125
Reading test 125
Practice from language to code 127
Read more code 128
Frequently asked questions 128
What the code looks like 130
About class Name(object) 132
Additional exercises 132
Frequently asked questions 133
Simple game engine analysis 135
Write down or draw the question 135
Extract and study key concepts 135
Create class hierarchies and diagrams for various concepts
Object graph 136
Write and run various classes 137
Repeat and optimize 139
Top down and bottom up 139
《 come from Percal 25 The gotons of planet 》 Of
Code 139
Should see the results 145
Additional exercises 146
Frequently asked questions 146
What is inheritance 147
Implicit inheritance 148
Explicit coverage 149
Replace... Before or after operation 149
A combination of three ways 151
Why use super() 152
super() and __init__ Use it with 152
synthesis 153
Applications of inheritance and composition 154
Additional exercises 154
Frequently asked questions 155
Evaluate your game 156
The style of functions 157
Class style 157
Code style. 158
Good note 158
Score your game 158
Python Package installation 160
Create skeleton project directory 161
The final directory structure 162
Test your configuration 164
Use this skeleton 164
quiz 164
Frequently asked questions 165
Write test cases 166
Test Guide 168
Should see the results 169
Additional exercises 169
Frequently asked questions 169
Our game vocabulary 170
Punctuation 171
Vocabulary tuple 171
Scan input 171
Exceptions and numbers 171
What should be tested 172
Design tips 174
Additional exercises 174
Frequently asked questions 174
match and peek 175
Grammar of sentences 176
About anomalies 178
What should be tested 179
Additional exercises 179
Frequently asked questions 179
install lpthw.web 180
Write a simple “Hello World” project 181
What's going to happen 182
Correct mistakes 183
Create a basic template file 183
Additional exercises 185
Frequently asked questions 186
Web How it works 187
How forms work 189
establish HTML Forms 191
Create layout templates 193
Write automatic test code for the form 194
Additional exercises 196
Frequently asked questions 197
Refactoring exercises 43 The game in 198
Session and user tracking 203
Create the engine 204
final exam 207
Frequently asked questions 208
The next way 209
How to learn any programming language 210
Because of the more content of the article , Space is not allowed , Some of the contents not shown are shown in the form of screenshots . If you need to get complete information and documents, please like them + Comment on stupid methodology python, Free access to .
author | Li Qiujian Pro
Django Display server performa