>>> import string >>> string.ascii_letters ‘abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ‘ >>> string.ascii_lowercase ‘abcdefghijklmnopqrstuvwxyz‘ >>> string.ascii_uppercase ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ‘ >>> string.digits ‘0123456789‘ >>> string.hexdigits ‘0123456789abcdefABCDEF‘ >>> string.letters Traceback (most recent call last): File "<pyshell#98>", line 1, in <module> string.letters AttributeError: ‘module‘ object has no attribute ‘letters‘ >>> string.octdigits ‘01234567‘ >>> string.punctuation ‘!"#$%&\‘()*+,-./:;<=>[email protected][\\]^_`{|}~‘ >>> #punctuation[英][?p??kt?u?e??n][美][?p??kt?u?e??n] n.标点符号 Traceback (most recent call last): File "<pyshell#101>", line 2, in <module> n.标点符号 NameError: name ‘n‘ is not defined >>> string.printable ‘0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\‘()*+,-./:;<=>[email protected][\\]^_`{|}~ \t\n\r\x0b\x0c‘ >>> string.whitespace ‘ \t\n\r\x0b\x0c‘
时间: 2024-10-12 05:05:45