code: def partition(predicate, iterable):
      
  
      t1, t2 = tee(iterable)
  
      return filterfalse(predicate, t1), filter(predicate, t2)
docs: Use a predicate to partition true and false entries.
  
      Reference
      ---------
      Python itertools documentation.