#_*_ coding:utf-8 _*_
#python2.7
aa=123-12j
print aa.real
#output实数部分 123.0
print aa.imag
#output虚数部分 -12.0
#python3
aa=123-12j
print(aa.real)
print(aa.imag)
标签:aa,real,12jprint,python,imag,123,复数,print From: https://blog.51cto.com/u_15932543/5994454