Quantcast
Viewing all articles
Browse latest Browse all 14215

How do I add data from a python program to Markdown?

I want to be able to get a multi-line string from a python file and display it in Markdown, so that I don't have to keep updating the Markdown file to match with the file.I'm new to using Markdown, so I don't have much experience with it.

I tried 2 things:

```{python}  import mymodule  print(mymodule.mystring)  ```

and

```python  import mymodule  print(mymodule.mystring)  ```

I want it to just show the data that mystring represents, but instead it just displays the python code itself.

Note that mymodule is another file in the same folder, and mystring is a multi-line string in that file.


Viewing all articles
Browse latest Browse all 14215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>