1 写入py文件
%%file hello.py
def func_inside_script(x, y):
return x + y*x
print('Hello World')
2 运行py文件
%run hello.py
无法嵌套运行
%%file hello2.py
%run hello.py
print('Hello World 2')
Writing hello2.py
%run hello2.py
SyntaxError: invalid syntax
ref: https://mp.weixin.qq.com/s/9-eIRKgk8xxp4gZmu-Fqaw