How Jupyter Notebook Cell can make a statement at the same time the output value of more?

Two ways:
1. Add the following two lines (valid only for the current file) at the beginning of each new file:
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
 
2. Direct Add Profile (valid for all files):
vi ~/.ipython/profile_default/ipython_config.py
Configuration file as follows:
c = get_config()
#Run all nodes interactively
c.InteractiveShell.ast_node_interactivity = "all"

Results are as follows:

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/bella1102/p/11032519.html