Pythonの.ipynbファイルを.pyに変換する

Jupyter Notebookが起動している状態で下記コマンドで実行

jupyter nbconvert --to python xxx.ipynb