def contains_whitespace(s):
    """True if there are any whitespace characters in s."""
    if isinstance(s, str):
        ws = ' \t\n\r\x0b\x0c'
    else:
        ws = b' ', b'\t', b'\n', b'\r', b'\x0b', b'\x0c'
    for ch in ws:
        if ch in s:
            return True
    else:
        return False
