i'm doing school project which is calculator of complex numbers. I wrote a function to calculate it but i dont know how to slice input string to make single arguments from it.
It looks like this:
in1: [complex(1.0, 1.0), complex(1.0, 1.0), ’*’, False, ’nazwa’]
in2: [complex(1 , 1), 2, ’+’, True, ’test’]
Its first number, second, operation, and two other arguments. I would like to slice it like:enter code here
number1 = 1.0,1.0
number2 = 1.0,1.0
operation = *
and 2 others. I tried input().split() but it splits it like this : [(complex(1.0 | 1.0) | '*' etc.