is_notebook

is_notebook()[source]

Detect if the current environment is a Jupyter notebook.

Based on a method posted on StackOverflow:
Returns

True if the current environment is a Jupyter notebook, False

Return type

bool