ipython maintains small on-disk database containing the text of each command that you execute this serves various purposessearchingcompletingand executing previously-executed commands with minimal typing persisting the command history between sessions logging the input/output history to file searching and reusing the command history being able to search and execute previous commands isfor many peoplethe most useful feature since ipython encourages an iterativeinteractive code development workflowyou may often find yourself repeating the same commandssuch as %run command or some other code snippet suppose you had runin[ ]%run first/second/third/data_script py and then explored the results of the script (assuming it ran successfully)only to find that you made an incorrect calculation after figuring out the problem and modifying data_script pyyou can start typing few letters of the %run command then press either the key combination or the key this will search the command history for the first prior command matching the letters you typed pressing either or multiple times will continue to search through the history if you pass over the command you wish to executefear not you can move forward through the command history by pressing either or after doing this few times you may start pressing these keys without thinkingusing gives you the same partial incremental searching capability provided by the readline used in unix-style shellssuch as the bash shell on windowsread line functionality is emulated by ipython to use thispress then type few characters contained in the input line you want to search forin [ ]a_command foo(xyz(reverse- -search)`com'a_command foo(xyzpressing will cycle through the history for each line matching the characters you've typed input and output variables forgetting to assign the result of function call to variable can be very annoying fortunatelyipython stores references to both the input (the text that you typeand output (the object that is returnedin special variables the previous two outputs are stored in the (one underscoreand __ (two underscoresvariablesrespectively ipythonan interactive computing and development environment www it-ebooks info