Converting Python complex string output like (-0-0j) into an equivalent complex string

In Python, I’d like a good way to convert its complex number string output into an equivalent string representation which, when interpreted by Python, gives the same value. Basically I’d like function complexStr2str(s: str): str that has the property that eval(complexStr2str(str(c)) == c, for any c of type complex. Note that (-0-0j) is not the…

Details