How to get python code and markdown in one cell

Can a jupyter laptop support embedded python code (arthritic calculations or draw a picture) in a markdown cell or visa visa. Have both python code and markdown in one cell.

+5
source share
2 answers

I don't think this is possible, but there is an extension that you could use: https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/python-markdown

Thus, you can display the result (and only the result) of the python operator inside the markdown cell.

+1
source
from IPython.display import display, Markdown display(Markdown("# Hello World!")) 
+6
source

Source: https://habr.com/ru/post/1242825/


All Articles