Only in the interactive interpreter, you can use _ (underscore) to get the last printed statement. For example:
>>> 1 + 2 3 >>> _ 3 >>>