def compact(items):
    """Remove None items from sequence

    Args:
      items: sequence to remove Nones from

    Returns:
      new sequence with no Nones

    >>> list(compact([1, None, 2]))
    [1, 2]

    """
    return filter(lambda x: x is not None, items)