1.如果用jupyter notebook 写代码,需要多行输出,一定要加上这个代码
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

1.如果用jupyter notebook 写代码,需要多行输出,一定要加上这个代码
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"