title: what options to convert this to a string?
body: <p>I need following desired output so that I can copy and paste into another program. Not sure how to use the correct string syntax.</p>
  <pre><code>A = 10 
  B = 20
  u = np.linspace(0, 2* np.pi*57.3, 1000)
  print((A+B)*cos(u))
  </code></pre>
  <p>Output:</p>
  <pre><code>30
  </code></pre>
  <p>Desired Output</p>
  <pre><code>(10+20)*cos(u)
  </code></pre>