I am new to python so my question may sound silly. Trying to print some complex numbers.
t1 = 5j
t2 = -5j
print(t1)
print(t2)
This prints:
5j
(-0-5j)
Can someone please explain what is the rule/logic behind this formation?
The print function is doing its best to print a mathematical equation to represent the number, which is then surrounded by parenthesis. In the second case, the notation is the real number added to the imaginary component. Further reading here.