out[ ] in [ ] out[ ] input variables are stored in variables named like _ixwhere is the input line number for each such input variables there is corresponding output variable _x so after input line saythere will be two new variables (for the outputand _i for the input in [ ]foo 'barin [ ]foo out[ ]'barin [ ]_i out[ ] 'fooin [ ] out[ ]'barsince the input variables are stringsthat can be executed again using the python exec keywordin [ ]exec _i several magic functions allow you to work with the input and output history %hist is capable of printing all or part of the input historywith or without line numbers %reset is for clearing the interactive namespace and optionally the input and output caches the %xdel magic function is intended for removing all references to particular object from the ipython machinery see the documentation for both of these magics for more details when working with very large data setskeep in mind that ipython' input and output history causes any object referenced there to not be garbage collected (freeing up the memory)even if you delete the variables from the interactive namespace using the del keyword in such casescareful usage of %xdel and %reset can help you avoid running into memory problems logging the input and output ipython is capable of logging the entire console session including input and output logging is turned on by typing %logstartin [ ]%logstart activating auto-logging current session state plus future input saved filename ipython_log py mode rotate output logging false raw input log false using the command history www it-ebooks info