You could use a jupyter notebook for this
Side-note: is the inverse of this available? E.g. open a jupyter notebook from in the middle of a python script
Side-note: is the inverse of this available? E.g. open a jupyter notebook from in the middle of a python script
[1] https://code.visualstudio.com/docs/python/jupyter-support-py...