How do I access the last "un-caught" variable in the interpreter?
Remco Gerlich
scarblac at pino.selwerd.nl
Wed Jun 20 04:43:32 EDT 2001
Dan Moskowitz <danielm at cronus.res.cmu.edu> wrote in comp.lang.python:
> Pretty simple question:
>
> >>> 2+2
> 4
> >>> # can i access the 4 if i didn't catch it in a var?
>
> Is there some variable for the last result returned from the
> interpreter? I thought that I used to know how to do it, but I've
> forgotten. Anyone know?
>
> interpreter.last ?
>>> _
4
(only works interactively)
--
Remco Gerlich
More information about the Python-list
mailing list