A Jupyter notebook is saved in a JSON text file. This file contains the entire contents of the notebook: text, code, and outputs. The Matplotlib figures are encoded as base64 strings within the notebooks, resulting in standalone, but sometimes big, notebook files.
json module in Python's standard library).
nbconvert (https://nbconvert.readthedocs.io/en/stable/) is a tool that can convert notebooks ...