why does python say variable referenced before assignment in the same function 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()