How to call a fucntion from a .py file in Jupyter Notebook?
问题 I don't want to write the same function in each Jupyter Notebook files. It would be easier if I just need to edit the function once without the need to edit in each .ipynb file. The problem is, I have to restart kernel if I edit the .py file which will re-start everything. Is there any way I can simply call a function from several .pynb files? PS: After I have edited the .py, it does not affect the .ipynb file. 回答1: Yes, you need a make .py file with function defined and import that file then