python how to get imaginary pat code example Example: python how to get imaginary pat >>> z = complex(2,5) >>> z (2+5j) >>> z.real 2.0 >>> z.imag 5.0