def getComplexByWords(words, wordIndex=0):
 try:
  return complex(float(words[wordIndex]), float(words[(wordIndex + 1)]))
 except:
  pass
 return None

def getComplexByWords ( words , wordIndex = 0 ) : try : return complex ( float ( words [ wordIndex ] ) , float ( words [ ( wordIndex + 1 ) ] ) ) except : pass return None
get the complex by the first two words .