Python
Complex
❮ Python Glossary
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 »
Related Pages
Python Numbers Tutorial
Numbers
Int
Float
Type Conversion
Random Number
❮ Python Glossary
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.