In Jupyter notebook, is there any way to re-use the output the line above, within a cell?
Coming from Mathematica, I often find it useful to write things commands which work on the output of the last line using %
, here's a stupid example:
Integrate[f[x],x]
Limit[%,x->1] - Limit[%,x->0]
In general one can write %%%
for 3rd-last output etc. https://reference.wolfram.com/language/ref/Out.html
@nostradamus reminds me that underscore _
is the output of the last cell, at least in Python. (Get last answer .) I didn't initially ask this, but would particularly like to be able to do this within a cell, so as to be able to execute multiple steps with one shift-enter.
I would also like to know if there's a way of doing either of these in Julia instead of Python.