10

Is it possible to call bits of python inside a markdown cell? For example I might like to write

Above there is a plot of {{numVars}} variables

In a markdown cell, so that when I change something elsewhere I don't need to go back and update the descriptive text of things.

It needn't be statements, although that would be useful (len(x) + 5), variables would be enough to make a big difference!

Ben
  • 12,614
  • 4
  • 37
  • 69
  • 2
    This is a duplicate of http://stackoverflow.com/q/21364102/2870069 and http://stackoverflow.com/q/18878083/2870069 – Jakob Feb 16 '14 at 07:52
  • The current state of this issue can be read about [here](https://github.com/ipython/ipython/issues/2958#issuecomment-36393701) – Ben Mar 01 '14 at 02:10
  • Does this answer your question? [Can I use variables on an IPython notebook markup cell?](https://stackoverflow.com/questions/18878083/can-i-use-variables-on-an-ipython-notebook-markup-cell) – jglad Jan 02 '23 at 18:15

0 Answers0