Python String Constants
String constants and Template — ascii_letters, digits, punctuation, Template. This category documents 9 Python string constants entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: string.ascii_letters, string.ascii_lowercase, string.ascii_uppercase, string.digits, string.hexdigits, string.punctuation, string.whitespace, string.Template(), Template.safe_substitute(). string.ascii_letters string containing all ASCII letters (both lowercase and uppercase). string.ascii_lowercase string containing all lowercase ASCII letters. string.ascii_uppercase string containing all uppercase ASCII letters. string.digits string containing all decimal digit characters. string.hexdigits string containing all hexadecimal digit characters. String Constants belongs to the Core Language group alongside Built-in Functions, Statements & Keywords, Typing Module, Dataclasses Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground. Python Reference documents 978+ functions, methods, and modules across 114 categories of the standard library, and every entry in this String Constants category follows the same format — syntax first, then what it does, the parameters it accepts, what it returns, and a working code example — so once you have read one page you can read them all.