Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Local Variable | Variable Scope
course content

Зміст курсу

Intermediate Python: Arguments, Scopes and Decorators

Local VariableLocal Variable

A local variable is defined inside a function. You cannot access this variable outside the function's definition.

The output is:

The <strong>message</strong> variable is not accessible in the global scope; it exists only inside the function. When the function exits, this variable ceases to exist.

Все було зрозуміло?

Секція 4. Розділ 2
course content

Зміст курсу

Intermediate Python: Arguments, Scopes and Decorators

Local VariableLocal Variable

A local variable is defined inside a function. You cannot access this variable outside the function's definition.

The output is:

The <strong>message</strong> variable is not accessible in the global scope; it exists only inside the function. When the function exits, this variable ceases to exist.

Все було зрозуміло?

Секція 4. Розділ 2
some-alt