def find_anychar(string, chars, index=None, negate=0):
    """find_anychar(string, chars[, index]) -> index of a character or -1

    Find a character in string.  chars is a list of characters to look
    for.  Return the index of the first occurrence of any of the
    characters, or -1 if not found.  index is the index where the
    search should start.  By default, I search from the beginning of
    the string.
    
    """
    if index is None:
        index = 0
    while index < len(string) and \
          ((not negate and string[index] not in chars) or
           (negate and string[index] in chars)):
        index += 1
    if index == len(string):
        return -1
    return index