def getComplexDefaultByDictionary(defaultComplex, dictionary, key):
 if (key in dictionary):
  return complex(dictionary[key].strip().replace('(', '').replace(')', ''))
 return defaultComplex

def getComplexDefaultByDictionary ( defaultComplex , dictionary , key ) : if ( key in dictionary ) : return complex ( dictionary [ key ] . strip ( ) . replace ( '(' , '' ) . replace ( ')' , '' ) ) return defaultComplex
get the value as a complex .