Recall last result

Erik Max Francis max at alcyone.com
Mon Jun 9 12:18:50 CEST 2003


Alan Kennedy wrote:

> Erich Neuwirth wrote:
> 
> > Is there a standard way of recalling the last result?
> 
> Try "_", which accesses the last expression result, i.e.
> 
> >>>3.1415927*(2.5*2.5)
> 19.634954375
> >>>_
> 19.634954375

This is indeed true, but note that it is only the case in the
interactive interpreter.  It is not the case in a general script; it
wasn't clear which the original poster meant.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ Forgive your enemies, but never forget their names.
\__/  John F. Kennedy




More information about the Python-list mailing list