from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
- This avoids using
print()
to obtain multiple outputs in one cell. For example, given this code in one cell:
a = 1
b = 2
a
b
The output will be*:
1
2
[*] Except in Google's colab: the new line character is stripped so the out put is 1 2
.
I also add the following line if autocomplete or introspection is taking too long:
%config Completer.use_jedi = False
See this SO answer for details.