when I define a variable with a function from antother file UnboundLocalError: local variable 'date' referenced before assignment python code example
Example: python local variable referenced before assignment
variable = "Hello"
def function():
global variable
print(variable)
function()