Python Complex


Complex

Complex numbers are written with a "j" as the imaginary part:

Example

Complex:

x = 3+5j
y = 5j
z = -5j

print(type(x))
print(type(y))
print(type(z))
Try it Yourself »


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.