def subset(part, whole):
    """Test whether `part` is a subset of `whole`.

    Both must be iterable. Note consumable iterables will be consumed
    by the test!

    This is a convenience function.

    Examples::

        assert subset([1, 2, 3], [1, 2, 3, 4, 5])
        assert subset({"cat"}, {"cat", "lynx"})
    """
    return all(elt in whole for elt in part)