from typing import Iterable
from typing import Any


def copy_except(iterable: Iterable, exclude: Any) -> Iterable:
    """Copy iterable while excluding all occurrences of exclude.

    Args:
        iterable: An iterable to copy
        exclude: A value to exclude

    Returns:
        A generator yielding the values of iterable except exclude
    """

    return (val for val in iterable if val != exclude)