By default longer lines of text in the output cells of a Jupyter notebook will be wrapped. How to stop this behaviour?
If you don't want to mess around with a config file, you can modify the behaviour of a notebook ad hoc by calling the IPython.core.display function. Then add the CSS suggested by @atevm:
from IPython.core.display import display, HTML
display(HTML("<style>div.output_area pre {white-space: pre;}</style>"))
for line in range(5):
for num in range(70):
print(f" {num}", end="")
print()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With