Joke Collection Website - Talk about mood - What is the most practical way to learn python? How to learn python well?

What is the most practical way to learn python? How to learn python well?

learn Python.

writing code for the first time

like writing an article, you need to have a topic first, and then disassemble it. As for literary talent, whether the code is beautiful or not is another matter. In fact, it is to solve the problem of existence first, and then solve the problem of good or bad. This problem of good or bad will be introduced slowly in the future.

before we formally start programming, we describe all complicated problems in two aspects

one is coding rules

the other is data

Let me talk about coding first, which refers to Python high-level programming language. Since it is a language, there must be grammar, and it also needs material. You can think of it as Chinese or English. The grammar of a language is equivalent to the rules of coding. This is also the programming basis of Python.

data

now, talking about data, data is anything in a computer. Such as articles, movies, music, etc.

Python programming is to use its own grammar rules to process it, and then present the data results that customers want. We can regard the program or code as a steamed bread processing factory, where flour is the data used in the program, the machine processes the data according to the grammar, and steamed bread is the result of code output.

comment

comment: it is an explanation when you show the code to the partner or yourself in the future.

A single-line comment is indicated by a pound sign (#), and the comment is the content after the #.

generally used for the explanation of a line

multi-line comments are indicated by a pair of triple quotation marks (''''') or a pair of triple quotation marks (""""")

while multi-line comments are generally used for the explanation of the whole text or a certain code area.

three of the double quotation marks indicate the description of the whole document.

the python interpreter will not execute the content in the interpretation.

?