Often we want to transform a .py file into an .ipynb file. There is a single command line tool that can do this: jupytext --to notebook exercises.py