Solution Review: Updating Outer Scope Values
Let’s look at the solution to the challenge in the previous lesson.
Solution
C++
#var = 9def update_var(value):global varvar = valuereturn varprint(update_var(6))print(var)
Explanation
- While we
Let’s look at the solution to the challenge in the previous lesson.
#var = 9def update_var(value):global varvar = valuereturn varprint(update_var(6))print(var)