Do parameters still hold some value when the function call completes?


#1

Question

In Python, do parameters still hold some value when the function call completes?

Answer

When a function call completes, all the parameters will no longer store any values in them.

Unlike regular variables we’ve worked with before, that were not parameters, parameters do not continue to reference some value after the function finishes running. Parameters are essentially “temporary placeholder variables”, so they only temporarily, for the duration of the function call, hold onto values, and reference them while the function is running. Once the function call completes entirely, the parameters will dereference any values and become “empty” again.