I'm trying to convert an input string to a float but when I do it I keep getting some kind of error, as shown in the sample below.
>>> a = "3 + 3j"
>>> b = complex(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: complex() arg is a malformed string
a="3+3j"
. – Quasimodo