title: separate real and imaginary part of a complex number in python
body: <p>I have need to extract the real and imaginary elements of a complex number in python.  I know how to make a list into a complex number... but not the other way around.</p>
  
  <p>I have this:</p>
  
  <pre><code>Y = (-5.79829066331+4.55640490659j)
  </code></pre>
  
  <p>I need:</p>
  
  <pre><code>Z = (-5.79829066331, 4.55640490659)
  </code></pre>
  
  <p>and I will also need each part if there is a way to go directly without going by way of Z:</p>
  
  <pre><code>A = -5.79829066331
  B = 4.55640490659
  </code></pre>
  
  <p><a href="https://docs.python.org/2/library/functions.html#complex" rel="noreferrer">https://docs.python.org/2/library/functions.html#complex</a></p>
  
  <p>Thanks!</p>