A biblioteca nativa string possui um grupo de constantes relacionadas aos tipos de
caracteres como letras maiúsculas , dígitos e outros. Abaixo as constantes mencionadas.
string.ascii_lowercase:
abcdefghijklmnopqrstuvwxyz
string.ascii_uppercase:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
string.ascii_letters: ascii_lowercase + ascii_uppercase
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
string.digits:
0123456789
string.hexdigits:
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
string.whitespace:
space, tab, linefeed, return, formfeed e vertical tab
string.printable:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ,
whitespace
Exemplo 8
print(string.ascii_lowercase)
Saída
abcdefghijklmnopqrstuvwxyz