UnboundLocalError: local variable 'status' referenced before assignment code example
Example 1: UnboundLocalError: local variable 'r' referenced before assignment
r = 0
list = ['apple','lime','orange']
def list_list(x):
for i in x:
r +=1
print r
list_list(list)
Example 2: UnboundLocalError: local variable 'obj' referenced before assignment
UnboundLocalError: local variable 'obj' referenced before assignment