#1-100 represents line range to save. Below code should be at the end of the notebook and the entire file ran. save -a myfile.py 1-100