def is_one_of(options):
    """
    Validate that the given attribute is member of the given list.

    >>> f = is_one_of(['foo', 'bar'])
    >>> f('ham')
    False
    >>> f('foo')
    True
    >>> f('Foo')
    False
    >>> f = is_one_of([10, 15, 20])
    >>> f(20)
    True

    :param list options: The options that the attribute can be.
    :rtype: A validator function.
    """
    def validator(item):
        return item in options
    return validator