How do you suppress output in Jupyter running IPython?

Add %%capture as the first line of the cell. eg

%%capture
print('Hello')
MyFunction()

This simply discards the output, but the %%capture magic can be used to save the output to a variable – consult the docs

Leave a Comment