Tag: The div string is invalid return returns none of its SYS print
Only those parameters at the end of a formal parameter list can have default parameter values, that is, you cannot declare a function parameter by declaring a
The formal parameter of the default value is then declared without a default value for the formal parameter.
This is because the value assigned to the parameter is assigned according to the position. For example, Def func (A, b=5) is valid, but def func (a=5, b) is not valid.
Note that a return statement with no return value is equivalent to return none. None is a special in python that means nothing
Type. For example, if a variable has a value of none, you can indicate that it has no value.
The pass statement represents an empty block of statements in Python.
Def someFunction ():
Pass
The Convention for a document string is a multiline string whose first line begins with an uppercase letter and ends with a period. The second line is a blank line,
Starting with the third line is a detailed description. It is strongly recommended that you follow this convention when using a document string in your function.
You can use __DOC__ (note double underline) to call the document string property of the Printmax function (the name of the function)
From.. Import statement
If you want to enter the ARGV variable directly into your program (avoid playing sys every time you use it), then you can use
The FROM SYS import ARGV statement. If you want to enter all the names used by the Sys module, you can use the FROM sys
Import * statement. This is true for all modules. Generally, you should avoid using from. Import and use the import language
Because it will make your program easier to read and avoid conflicting names.
Summary of knowledge points in Python that are afraid of forgetting (continuous update)