string.whitespace
string.whitespace is a Python function in the String Constants category. String containing all ASCII whitespace characters. The syntax is string.whitespace. Returns: String. A typical example: repr(string.whitespace) # "' \t\n\r\x0b\x0c'". A close sibling is string.ascii_letters, which string containing all ASCII letters (both lowercase and uppercase). A close sibling is string.ascii_lowercase, which string containing all lowercase ASCII letters. A close sibling is string.ascii_uppercase, which string containing all uppercase ASCII letters. A close sibling is string.digits, which string containing all decimal digit characters. More about this category: String constants and Template — ascii_letters, digits, punctuation, Template. Related String Constants entries: string.ascii_letters, string.ascii_lowercase, string.ascii_uppercase, string.digits, string.hexdigits, string.punctuation. This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try string.whitespace immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.