@Ashwinkumar Jayakumarโ I have. The magic command is not for this purpose. In one cmd you can only use one magic command: %md, %python, etc. and only in the beginning of the command.
To reiterate, I want to use a variable in a markdown cmd (a cmd that I start with %md) that I have already defined in my notebook code cmd.