def etag_matches(etag, tags):
    """Check if the entity tag matches any of the given tags.

        >>> etag_matches('"xyzzy"', ['"abc"', '"xyzzy"', 'W/"woof"'])
        True

        >>> etag_matches('"woof"', ['"abc"', 'W/"woof"'])
        False

        >>> etag_matches('"xyzzy"', ['*'])
        True

    Note that you pass quoted etags in both arguments!
    """
    for tag in tags:
        if tag == etag or tag == '*':
            return True
    return False
