def _split_list(s, predicate):
 yes = []
 no = []
 for x in s:
  if predicate(x):
   yes.append(x)
  else:
   no.append(x)
 return (yes, no)

def _split_list ( s , predicate ) : yes = [ ] no = [ ] for x in s : if predicate ( x ) : yes . append ( x ) else : no . append ( x ) return ( yes , no )
split sequence s via predicate .