count = 10
def update():
count = count + 1
update()UnboundLocalError: local variable 'count' referenced before assignment
count = 10
def update():
global count
count = count + 1
update()
print(count)I tried to update a variable inside a function without declaring it.