...

/

Solution Review: Updating Outer Scope Values

Solution Review: Updating Outer Scope Values

We'll cover the following...

Let’s look at the solution to the challenge in the previous lesson.

Solution

Press + to interact
#var = 9
def update_var(value):
global var
var = value
return var
print(update_var(6))
print(var)

Explanation

  • While we
...