I. Dynamic parameters of a function
1.1 *args Positional Parameters dynamic parameter transfer
def func (*args): passfunc (" Hello "," who are you "," What are you doing? ")
* This indicates the dynamic parameters of the receive location parameter, received a tuple
1.2 **kwargs keyword dynamic parameter
1 def chi (**2 print (food)34 chi (good_food=" The dog is ignoring ", no_good_food=" Hamburg ", drink=" great White pear ", ice _cream=" Qiao Lez ")
* * Here means to receive the keyword parameter, received a dictionary
Order: Position parameter, *args, default value parameter, **kwargs
Position of formal parameter *,**: aggregation
The location of the argument *,** juniors
Two. namespaces
1.1 Built-in namespaces
1.2 Global namespaces
1.3 Local namespaces
1.4 Acting on
1.4.1 Global scope
1.4.2 Local Scopes
Globals () viewing content in the global
Locals () view content in the current scope
Three. Nesting of functions
Four. Global and nonlocal
Global: Content in local access globally
Nonlocal: Look for the variable in the outer function that is closest to him in the local
Python function advanced