from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = "all"
vi ~/.ipython/profile_default/ipython_config.py
c = get_config() #Run all nodes interactively c.InteractiveShell.ast_node_interactivity = "all"
效果如下:
Jupyter notebook 如何让一个Cell 可以同时输出多个语句的值?
原文:https://www.cnblogs.com/bella1102/p/11032519.html