I wonder why reference variable(dict, list) is accessible from nested function while simple object is not.
In [1]: a = 1
In [2]: b = [1]
In [3]: c = {"c" : 1}
In [4]:
In [4]: def f():
...: a = 2
...: b[0] = 2
...: c["c"] = 2
...:
In [5]: f()
In [6]:
In [6]: print a
1
In [7]: print b
[2]
In [8]: print c
{'c': 2}