Python -- functions, python Functions
Function features:
1. Data Consistency
2. Reuse of code
3. Program scalability
4. After return, other commands will not be executed and return will be terminated.
5. If multiple values are defined, the values are listed in the form of a single tuples.
6. The actual parameters and format parameters must be one-to-one matched, and there must be no more or less parameters.
7. The default value is not required when the parameter is called again.
8. The parameter group must be placed after other parameters.
9. Local variables take effect only in functions. A function is the scope of a variable.
10. global variables should not be changed in the function.
Python function definition method:
Def test (): # Set a function name # test # annotate function print ('function programming ') # function program processing logic return 0 # define return value, if no definition is specified, None is returned.