python local variable referenced before assignment deutsch code example
Example: python local variable referenced before assignment
variable = "Hello"
def function():
global variable
print(variable)
function()
variable = "Hello"
def function():
global variable
print(variable)
function()