Converts a given string into a complex number.
complex() to convert the string
"1+7j" into a complex number:
num = complex("1+7j")print(num)
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
- Anonymous contributors
Learn Python on Codecademy
- Anonymous contributorsAnonymous contributors