def getComplexByCommaString(valueCommaString):
 try:
  splitLine = valueCommaString.replace(',', ' ').split()
  return complex(float(splitLine[0]), float(splitLine[1]))
 except:
  pass
 return None

def getComplexByCommaString ( valueCommaString ) : try : splitLine = valueCommaString . replace ( ',' , ' ' ) . split ( ) return complex ( float ( splitLine [ 0 ] ) , float ( splitLine [ 1 ] ) ) except : pass return None
get the commastring as a complex .