"Learning Python with You Hand in Hand" 38-Summary of the second stage

In the last article "Learning Python with You Hand in Hand" 37-Program Refactoring , we applied what we learned before and experienced the process of program refactoring.

So far, we have basically mastered the basic grammatical knowledge, data structure and language logic of Python, which has laid the foundation for us to continue to learn and use Python in the future.

In this article, we will make a summary of the content of the 18 articles learned at this stage, so that everyone can understand the knowledge framework and master the key content.

1. Data structure

At the beginning of this stage, we learned four data structures such as lists, tuples, dictionaries, and sets. At the same time, together with the strings and numbers learned in the first stage, they formed the most basic digital map in the Python world. These data structures, or containers, carry all the changes and changes in Python, and also show the connotation and extension of Python in a rich form.

"Learning Python with You Hand in Hand" 20-List

"Learning Python with You Hand in Hand" 21-Tuples

"Learning Python with You Hand in Hand" 22-Dictionary

"Learning Python with You Hand in Hand" 24-Collection

2. Built-in functions

After that, we used two articles to introduce you to several built-in sequence functions and deductive use methods such as lists. Together with the data structure we learned before, we showed us the powerful and convenient data processing and programming of Python. the way. With the blessing of built-in sequence functions and derivation, we can easily generate various types of data structures and flexibly apply them to our programs.

"Learning Python with You Hand in Hand" 23-Built-in Sequence Function

"Learning Python with You Hand in Hand" 25-List Comprehension

3. Custom function

If data structure is the foundation of Python, then custom functions are the soul of Python. With custom functions, we can communicate with Python better, and gallop in the Python world as we like.

"Learning Python with You Hand in Hand" 26-Custom Functions

"Learning Python with You Hand in Hand" 27-Parameters of Custom Functions

"Learning Python with You Hand in Hand" 28-the return value of a custom function

"Learning Python with You Hand in Hand" 29-Anonymous Functions

4. Module

Application modules not only change the way we write a program throughout a file in the past, but also open the door to a powerful Python library. Since then, each of us is no longer a solitary developer, but because of the existence of the library and the application are connected together to create a more powerful Python.

"Learning Python with You Hand in Hand" 30-Module

5. File processing

Here, we detailed several ways Python processes files. Maybe when we learn more advanced file processing methods, the content here may not be applied much. But it is the basic method and principle of various file processing methods in Python. Based on these basic operations, it can help us better understand and apply other file processing methods in the future, and get twice the result with half the effort.

"Learning Python with You Hand in Hand" 31-File Opening

"Learning Python with You Hand in Hand" 32-File Reading

"Learning Python with You Hand in Hand" 33-closing the file

"Learning Python with You Hand in Hand" 34-File Writing

"Learning Python with You Hand in Hand" 35-Data Storage

6. Error and exception handling

Although errors and exceptions are unavoidable, for a developer, it is necessary to eliminate them before they are delivered to users. It requires us to comprehensively think about various possible situations and make predictions, and handle errors and exceptions in an elegant way, so as to show users a perfect operation process.

"Learning Python with You Hand in Hand" 36-Error and Exception Handling

7. Reconstruction of the program

Reconstruction of the program is not a technique, but an attitude. Maybe everyone has their own programming style, but no matter what programming style, we should show everyone the clearest and neatest code possible.

"Learn Python with You Hand in Hand" 37-Program Reconstruction

Through a stage summary article, not only sorted out the second stage of learning, but also marked the end of our introduction to the entire basic knowledge of Python. If there are other basic knowledge that needs to be introduced, we will add them in the "Python in practice" series of articles.

Next, we will introduce some more about object-oriented programming, as the end of the Python entry stage, so stay tuned.

 

image

 


Thanks for reading this article! If you have any questions, please leave a message and discuss together ^_^

To read other articles in the "Learning Python with You Hand in Hand" series, please follow the official account and click on the menu selection, or click the link below to go directly.

"Learning Python with You Hand in Hand" 1-Why learn Python?

"Learning Python with you hand in hand" 2-Python installation

"Learning Python with You Hand in Hand" 3-PyCharm installation and configuration

"Learning Python with You Hand in Hand" 4-Hello World!

"Learning Python with You Hand in Hand" 5-Jupyter Notebook

"Learning Python with You Hand in Hand" 6-String Identification

"Learning Python with You Hand in Hand" 7-Index of Strings

"Learning Python with You Hand in Hand" 8-String Slicing

"Learning Python with You Hand in Hand" 9-String Operations

"Learning Python with You Hand in Hand" 10-String Functions

"Learning Python with You Hand in Hand" 11-Formatted Output of Strings

"Learning Python with You Hand in Hand" 12-Numbers

"Learning Python with You Hand in Hand" 13-Operation

"Learning Python with You Hand in Hand" 14-Interactive Input

"Learning Python with You Hand in Hand" 15-judgment statement if

"Learning Python with You Hand in Hand" 16-loop statement while

"Learning Python with You Hand in Hand" 17-the end of the loop

"Learning Python with You Hand in Hand" 18-loop statement for

"Learning Python with You Hand in Hand" 19-Summary of the first stage

"Learning Python with You Hand in Hand" 20-List

"Learning Python with You Hand in Hand" 21-Tuples

"Learning Python with You Hand in Hand" 22-Dictionary

"Learning Python with You Hand in Hand" 23-Built-in Sequence Function

"Learning Python with You Hand in Hand" 24-Collection

"Learning Python with You Hand in Hand" 25-List Comprehension

"Learning Python with You Hand in Hand" 26-Custom Functions

"Learning Python with You Hand in Hand" 27-Parameters of Custom Functions

"Learning Python with You Hand in Hand" 28-the return value of a custom function

"Learning Python with You Hand in Hand" 29-Anonymous Functions

"Learning Python with You Hand in Hand" 30-Module

"Learning Python with You Hand in Hand" 31-File Opening

"Learning Python with You Hand in Hand" 32-File Reading

"Learning Python with You Hand in Hand" 33-closing the file

"Learning Python with You Hand in Hand" 34-File Writing

"Learning Python with You Hand in Hand" 35-Data Storage

"Learning Python with You Hand in Hand" 36-Error and Exception Handling

"Learn Python with You Hand in Hand" 37-Program Reconstruction

For Fans: Follow the "also said Python" public account, you can download the sample sentences used in this series of articles for free.

Also talk about Python-a learning and sharing area for Python lovers

Guess you like

Origin blog.csdn.net/mnpy2019/article/details/112417182