there is a %qtconsole magic command available for use with jupyter notebook. this invokes the qtconsole as a slave terminal to notebook frontend. as a result, data between notebook and qtconsole terminal can be shared.
you can see that the variable in notebook is accessible within qtconsole window. also, a new variable in qtconsole is used back in notebook.
observe that the input and output cells are numbered incrementally between the two.