Extract the imaginary part
while ( i < len ( s1 ) and s1 [ i ] . isdigit ( ) ) : NEW_LINE INDENT b = b * 10 + ( int ( s1 [ i ] ) ) NEW_LINE i += 1 NEW_LINE DEDENT if ( sa ) : NEW_LINE INDENT a *= - 1 NEW_LINE DEDENT if ( sb ) : NEW_LINE INDENT b *= - 1 NEW_LINE DEDENT v . append ( a ) NEW_LINE v . append ( b ) NEW_LINE return v NEW_LINE def complexNumberMultiply ( v ) : NEW_LINE