Sharing variables between Notebook and REPL in Visual Studio or JupyterLab

In jupyter lab, if you right click on the tab containing your Notebook you can open a REPL connected to the same kernel with “New console for Notebook”. Maybe that helps?