title: Jupyter Notebook - run cell and save as .py file
body: <p>I know of the <code>%%writefile .py</code> cell-magic command but it causes the cell to not run. What I want is for the cell to run and create the .py as well.</p>
  <p>Edit 1: I only want the original code in the cell to be saved as a .py file. I don't need the results</p>