def split_choices(choices, split):
 index = [idx for (idx, (key, title)) in enumerate(choices) if (key == split)]
 if index:
  index = (index[0] + 1)
  return (choices[:index], choices[index:])
 else:
  return (choices, [])

def split_choices ( choices , split ) : index = [ idx for ( idx , ( key , title ) ) in enumerate ( choices ) if ( key == split ) ] if index : index = ( index [ 0 ] + 1 ) return ( choices [ : index ] , choices [ index : ] ) else : return ( choices , [ ] )
split a list of [] pairs after key == split .