`org-mode` has the ability to evaluate code blocks and store the output in a following results block[0].
You can configure it to run just about everything in various ways and therefore you can do Literate Programming in nearly the full Knuth sense in it.
I find it's a good solution for a local "notebook" similar to IPython/Jupyter Notebooks but for any language in Emacs.