Module 6
Local variables
Variables inside functions.
Variables that stay inside
Variables created inside a function are local. They exist only while the function is running and cannot be accessed from outside.
Python
def compute():
result = 42
print(result)
compute()→ 42
What is a local variable?