Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Markdown in jupyter-notebook producing only one ouput overwriting the prev. one

I am using jupyter notebook, trying to have a markdown output. This is the minimal example of what I am trying to do (in the original code, the various strings to be print are coming from different functions):

from IPython.display import Markdown as md
md("hello")
md("world")

the output is

world

instead of the expected

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

hello
world

I really would like to avoid resorting to something like merging the strings as in:

md("hello\nworld")

or passing the different outputs to a file and then read it

Is there any way to achieve this?

>Solution :

Add display

from IPython.display import Markdown as md
display(md("hello"))
display(md("world"))
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading