Let’s say we have two Jupyter notebooks and we need to share a variable from first notebook to the second notebook.
How can we do that?
Jupyter provides magic commands to ease operations which are complex otherwise. The magic command we are going to use today is %store.
The %store magic command saves the specified variable and lets you pass the value of variables between two notebooks.
Lets see how we can pass the variable value:%store x #x is a variable to share
and now how to retrieve the value in other notebook:%store -r x
Happy Learning !!!