How to print/show an expression in rational number form in python
<p>I've been developing a Tkinter app and at some label i need to put formula that should look like a rational number(expression1/expression2, like a numerator and denominator and a bar between them). I did some digging and couldnt find anything related to it. Any suggestions on how this can be done ?</p>

<p>I even couldnt find anything on printing a fraction in a rational number format on the console. I oonly care about the looks and no calculation will be made with it, its just a label</p>

<pre><code>print('\n\033[4m'+'3' + '\033[0m'+'\n2')
</code></pre>

<p><code>\033[4m</code> enables underline</p>

<p><code>\033[0m</code> resets it</p>

<p>It will basically display something that looks like (with an underline under the 3):</p>

<pre><code>3
2
</code></pre>

python math tkinter