The Python interpreter executes the program procedure:
1. Start python interpreter a program to take files from hard disk to memory
2. Read the C:\test.py content from the hard disk into memory (this step is the same as the text editor)
3. The text editor reads into memory and the Python also executes the code that reads into the memory.
If you want to permanently save the code, you need to use the file .
If you want to debug a program, you need to use interactive mode.
Variable:
Change: The core is changing
Quantity: Measurement, measurement, expression is a state
Level = 0
Level = 1
Definition of variable: variable name = variable Value
Variable definition rules:
1. Variable names can only be any combination of letters, numbers, or underscores
2. The first character of a variable name cannot be a number
3. Individual keywords cannot be used to take variable names.
Changes to variables:
Garbage collection:values that are not bound in Python are recycled.
The reference count of the value or the name of the variable that is bound on the body is 0, and thePython interpreter is recycled periodically.
Delete simply deletes a binding relationship.
ID (variable name) memory address
Type (variable name)
The contents of the Print (variable name) value
Determine if the identity of two values is the same:
NAME1 is Name
IS: The ID is compared , as long as the ID, the other parts are the same.
Features of Python:
The length is not very long, there is a decimal pool,
Specifically for these decimals as the ID address.
= ID operation
= = Value Assignment operation
Some things in the program cannot be changed.
For example:
Constants: Constant Amount
There is no specific way to make a constant in Python, usually with an uppercase variable name,
There is only one hint effect.
Program Interaction:How Python interacts with the user.
The purpose of interaction: to simulate the server-side interaction with the user's connection
Input (' input ') for interactive
Ps:
Define a variable, the stored data is a variable value
Variable name and variable value are just a binding relationship
The variable name itself does not have the ability to store values
Basic knowledge of Python