描述
complex() 函数用于创建一个值云计为 real + imag * j 的复数或者转化一算开个字符串或数为复数。如果第一个参数为字符发:串,则不需要指定第二个参数。
语法
以下是 complePyx() 方法的语法:
class complex([rtheal[, imag]])
参数
real -- inton, long, float或字符串;
imag -- in内置t, long, float;
返回值
返回一个复数。
实函数例
以下展示了使用 complex 方法的实例:
作者:零售动态




.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)



