The first line after running the Python 2.7 interpreter on Windows:
>>> dir()
['__builtins__', '__doc__', '__name__', '__package__']
By entering the command dir(), you should define a special variable _:
>>> _
['__builtins__', '__doc__', '__name__', '__package__']
But even after input, _it does not appear when I try to list all the names in the interactive namespace using dir():
>>> dir()
['__builtins__', '__doc__', '__name__', '__package__']
How does the interpreter recognize this variable if it is not in the interpreter namespace?
source
share