SoFunction
Updated on 2024-11-19

Solving the jupyter notebook carriage return for two lines problem

I recently installed jupyter notebook, and the various shortcuts and editing modes are very comfortable to use. But my default browser is chrome

Every time you enter the line will be empty two lines, it is very inconvenient. Did not find the problem where, by chance Baidu to someone said may be the browser plug-in pot.

After closing all plug-ins and restarting jupyter notebook, it was resolved. After troubleshooting, I found that it was caused by the web restriction lifting script in Tampermonkey.

If you encounter such problems, please close the browser plug-in and try again.

Additional knowledge:jupyter notebook sets up multiple outputs for a single execution unit

Description of the problem

Everyday when we use jupyter, the default output of the last variable, the previous variables do not have any output, the situation is shown in the figure below, we can solve this problem by a simple setup.

cure

Multiple outputs can be set up by adding these two lines of command.

from import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"

Above this to solve the jupyter notebook carriage return for two lines of the problem is all that I have shared with you, I hope to be able to give you a reference, and I hope that you will support me more.