string.printable

返回可打印的字符串常量:包含digits + ascii_letters + punctuation + whitespace

定义

string.printable

返回可打印的字符串常量:包含digits + ascii_letters + punctuation + whitespace

返回值

返回可打印的字符串常量:包含digits + ascii_letters + punctuation + whitespace

示例

import string

r = string.printable
print(r)

执行结果为 :

0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~