In haskell ghci, "it" means last successful command, which can be used in next command arbitrarily as per need. Is some thing like this exist in python, not asking for history (reverse-i-search)
Asked
Active
Viewed 109 times
0
-
1`_` will give you the result of the last line evaluated (that wasn't `None`), in case that helps. – khelwood Nov 26 '18 at 11:50
1 Answers
4
_
will give you the result of the last line evaluated (that wasn't None
).
Python 3.7.1 (default, Nov 8 2018, 09:08:57)
[Clang 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 2+5
7
>>> _
7

khelwood
- 55,782
- 14
- 81
- 108