def flattenValue(value):
 for i in iter(value):
  if isListLike(i):
   for j in flattenValue(i):
    (yield j)
  else:
   (yield i)

def flattenValue ( value ) : for i in iter ( value ) : if isListLike ( i ) : for j in flattenValue ( i ) : ( yield j ) else : ( yield i )
returns an iterator representing flat representation of a given value .