表示复数信息
a = 12.3+4j print('a的类型为:', type(a)) # 运行结果:a的类型为: <class 'complex'> print(a.real) # 实部 print(a.imag) # 虚部
python中complex表示复数类型