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
More Related Contents:
- IOPub data rate exceeded in Jupyter notebook (when viewing image)
- How do I add python3 kernel to jupyter (IPython)
- How do I increase the cell width of the Jupyter/ipython notebook in my browser?
- “ImportError: No module named” when trying to run Python script
- In which conda environment is Jupyter executing?
- Change IPython/Jupyter notebook working directory
- How do I get the current IPython / Jupyter Notebook name
- How to load/edit/run/save text files (.py) into an IPython notebook cell?
- Importing .py files in Google Colab
- Link Conda environment with Jupyter Notebook
- Installing a pip package from within a Jupyter Notebook not working
- How do I block comment in Jupyter notebook? [closed]
- Running Jupyter with multiple Python and IPython paths
- How can I import from another ipython-notebook?
- How to programmatically generate markdown output in Jupyter notebooks?
- How to close IPython Notebook properly?
- Simple way to measure cell execution time in ipython notebook
- How to pickle or store Jupyter (IPython) notebook session for later
- How to disable password request for a Jupyter notebook session?
- How do I set up Jupyter/IPython Notebook for Django?
- How do I add a kernel on a remote machine in IPython (Jupyter) Notebook?
- Conda environments not showing up in Jupyter Notebook
- Purpose of “%matplotlib inline”
- How do I set custom CSS for my IPython/IHaskell/Jupyter Notebook?
- Install Python 3.8 kernel in Google Colaboratory
- What is the currently correct way to dynamically update plots in Jupyter/iPython?
- Get Output From the logging Module in IPython Notebook
- plt.imshow shows color images for grayscale images in IPython
- How to (intermittently) skip certain cells when running IPython notebook?
- How can I left justify text in a pandas DataFrame column in an IPython notebook