jupyter notebook 输出python多个变量的值 发表于 2021-02-05 分类于 Python jupyter 的一个 cell 默认输出最后一个变量的值,如果需要输出多个变量的值,除了使用 print 函数,还可以通过修改 ast_node_interactivity 选项来实现: 12from IPython.core.interactiveshell import InteractiveShellInteractiveShell.ast_node_interactivity = 'all' 效果如下图