class complex(real=0, imag=0)

Returns test


real??
imag??

REMARKS
* No prefix required - Core
* Return a complex number with the value real + imag*1j or convert a string or number to a complex number.
* If the first parameter is a string, it will be interpreted as a complex number and the function must be called without a second parameter.
* The second parameter can never be a string. Each argument may be any numeric type (including complex). If imag is omitted, it defaults to zero and the constructor serves as a numeric conversion like int and float. If both arguments are omitted, returns 0j.
* For a general Python object x, complex(x) delegates to x.__complex__(). If __complex__() is not defined then it falls back to __float__(). If __float__() is not defined then it falls back to __index__().

class complex(string) 

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top