IPython魔法命令---jupyter notebook初學

1.運行外部python文件 使用下面命令運行外部python文件(默認是當前目錄,最好加上絕對路徑) %run *.py 實踐例子: a.在當前文件夾下創建hello.py文件,並如下內容: def all_num(number_list): for number in number_list: print(number) b.%run 2. 運行計時 案例操作: ** a.timeit會多次運
相關文章
相關標籤/搜索