@manishtomar 

    >>> a = 5
    >>> def update_it():
    ...    a += 1
    ...    print a
    ... 
    >>> update_it()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<stdin>", line 2, in update_it
    UnboundLocalError: local variable 'a' referenced before assignment
    >>> a = [5]
    >>> def update_it():
    ...    a[0] += 1
    ...    print a[0]
    ... 
    >>> update_it()
    6