{'_dh': [u'/home/tcloudost/Documents/git_repositories/python-batches/batch-57/functions'], '__': '', 'my_func': <function my_func at 0x7f67b55b9f50>, '__builtin__': <module '__builtin__' (built-in)>, '_iii': u'# scope resolution\n# first look into locally and then globally.\n# global variables are those values which are available both inside and outside the function.\n\ny = 10 # global variable.\n\nprint globals()\n\ndef my_new1():\n print locals() # {}\n return y', 'quit': <IPython.core.autocall.ZMQExitAutocall object at 0x7f67b6e86290>, '_i9': u'print my_new()', '_i8': u'# namespaces\n# local scope/variables/namespaces vs global scope/variables/namespaces.\n\ndef my_new():\n a = 10\n return a\n\n# calling my already defined function my_new()\nprint my_new()\nprint a', '_i7': u'# namespaces\n# local scope/variables/namespaces vs global scope/variables/namespaces.\n\ndef my_new():\n a = 10\n return a\n\n# calling my already defined function my_new()\nprint my_new()', '_i6': u'print my_func()', '_i5': u'def my_func():\n return "hello world"\n print "hello1"\n print "hello2"\n print "hello3"', '_i4': u'print my_func()', '_i3': u'def my_func():\n return "hello world"', '_i2': u'print my_func()', '_i1': u'def my_func():\n print "hello world"', 'exit': <IPython.core.autocall.ZMQExitAutocall object at 0x7f67b6e86290>, 'get_ipython': <bound method ZMQInteractiveShell.get_ipython of <ipykernel.zmqshell.ZMQInteractiveShell object at 0x7f67bfae8950>>, '_i': u'# scope resolution\n# first look into locally and then globally.\n# global variables are those values which are available both inside and outside the function.\n\ny = 10 # global variable.\n\n\n\ndef my_new1():\n print locals() # {}\n return y', 'my_new1': <function my_new1 at 0x7f67b55b9e60>, '_i14': u'# scope resolution\n\ny = 10\n\ndef my_new1():\n print locals()\n return y', '__doc__': 'Automatically created module for IPython interactive environment', '_i20': u'print globals()', 'my_new': <function my_new at 0x7f67b4d32f50>, '_ii': u'print my_new1()\nprint y', '__builtins__': <module '__builtin__' (built-in)>, 'In': ['', u'def my_func():\n print "hello world"', u'print my_func()', u'def my_func():\n return "hello world"', u'print my_func()', u'def my_func():\n return "hello world"\n print "hello1"\n print "hello2"\n print "hello3"', u'print my_func()', u'# namespaces\n# local scope/variables/namespaces vs global scope/variables/namespaces.\n\ndef my_new():\n a = 10\n return a\n\n# calling my already defined function my_new()\nprint my_new()', u'# namespaces\n# local scope/variables/namespaces vs global scope/variables/namespaces.\n\ndef my_new():\n a = 10\n return a\n\n# calling my already defined function my_new()\nprint my_new()\nprint a', u'print my_new()', u'# locals()\n# locals is a inbuild function and it shows local variables.\n\ndef my_new():\n a = 10\n print locals()\n return a', u'print my_new()', u'print my_new()\nprint locals()', u'print my_new()', u'# scope resolution\n\ny = 10\n\ndef my_new1():\n print locals()\n return y', u'print my_new1()', u'print my_new1()\nprint y', u'# scope resolution\n# first look into locally and then globally.\n# global variables are those values which are available both inside and outside the function.\n\ny = 10 # global variable.\n\nprint globals()\n\ndef my_new1():\n print locals() # {}\n return y', u'print my_new1()\nprint y', u'# scope resolution\n# first look into locally and then globally.\n# global variables are those values which are available both inside and outside the function.\n\ny = 10 # global variable.\n\n\n\ndef my_new1():\n print locals() # {}\n return y', u'print globals()'], '__name__': '__main__', '___': '', '_': '', '_sh': <module 'IPython.core.shadowns' from '/usr/local/lib/python2.7/dist-packages/IPython/core/shadowns.pyc'>, '_i13': u'print my_new()', '_i12': u'print my_new()\nprint locals()', '_i11': u'print my_new()', '_i10': u'# locals()\n# locals is a inbuild function and it shows local variables.\n\ndef my_new():\n a = 10\n print locals()\n return a', '_i17': u'# scope resolution\n# first look into locally and then globally.\n# global variables are those values which are available both inside and outside the function.\n\ny = 10 # global variable.\n\nprint globals()\n\ndef my_new1():\n print locals() # {}\n return y', '_i16': u'print my_new1()\nprint y', '_i15': u'print my_new1()', '_ih': ['', u'def my_func():\n print "hello world"', u'print my_func()', u'def my_func():\n return "hello world"', u'print my_func()', u'def my_func():\n return "hello world"\n print "hello1"\n print "hello2"\n print "hello3"', u'print my_func()', u'# namespaces\n# local scope/variables/namespaces vs global scope/variables/namespaces.\n\ndef my_new():\n a = 10\n return a\n\n# calling my already defined function my_new()\nprint my_new()', u'# namespaces\n# local scope/variables/namespaces vs global scope/variables/namespaces.\n\ndef my_new():\n a = 10\n return a\n\n# calling my already defined function my_new()\nprint my_new()\nprint a', u'print my_new()', u'# locals()\n# locals is a inbuild function and it shows local variables.\n\ndef my_new():\n a = 10\n print locals()\n return a', u'print my_new()', u'print my_new()\nprint locals()', u'print my_new()', u'# scope resolution\n\ny = 10\n\ndef my_new1():\n print locals()\n return y', u'print my_new1()', u'print my_new1()\nprint y', u'# scope resolution\n# first look into locally and then globally.\n# global variables are those values which are available both inside and outside the function.\n\ny = 10 # global variable.\n\nprint globals()\n\ndef my_new1():\n print locals() # {}\n return y', u'print my_new1()\nprint y', u'# scope resolution\n# first look into locally and then globally.\n# global variables are those values which are available both inside and outside the function.\n\ny = 10 # global variable.\n\n\n\ndef my_new1():\n print locals() # {}\n return y', u'print globals()'], 'y': 10, '_i19': u'# scope resolution\n# first look into locally and then globally.\n# global variables are those values which are available both inside and outside the function.\n\ny = 10 # global variable.\n\n\n\ndef my_new1():\n print locals() # {}\n return y', '_i18': u'print my_new1()\nprint y', '_oh': {}, 'Out': {}}