Zero-based learning Python (1) of variable assignment

Assignment symbol

In Python, the equal sign "=" is called assignment symbol. This blog say is constituted by the equal sign assignment.

Detailed

Assignment format: variable name = value to be assigned to this variable. Execution order assignment statement is from right to left, that is, the value of the right to exist in the variable on the left. Variables can be understood as a container for storing data. For example, the following line of code:

number = 0

This code is to 0 this figure there is a variable number inside. In this program, number of stored data is 0 ,. If you want to change, such as change the number 1, to write again on it:

number = 1

Thus, number of values which will be replaced is the number 1. Note: It is "replace"! The number 0 does not exist anymore!

Focus point Zanga

Well, variables, and knowledge of an assignment statement so much. I am concerned to see my future updates! See you next time! ! !

Released two original articles · won praise 11 · views 506

Guess you like

Origin blog.csdn.net/BearProgramming/article/details/105116247