Python also supports complex numbers, or numbers made up of a real and an imaginary part.
Just like the print() statement is used to print values, complex() is used to create complex numbers.
It requires two values. The first one will be the real part of the complex number, while the second value will be the imaginary part.
Here’s the template for making a complex number:
complex(real, imaginary)
Let’s see a few examples: