两行代码打印出ASCII码字母表、数字、标点符号(python)

先上效果图:
在这里插入图片描述
实现代码:

import string

#打印ASCII 字母表、数字、标点符号:
for item in [string.ascii_letters, string.digits, string.punctuation]:
    print('{}\t{}'.format(len(item), item))

猜你喜欢

转载自blog.csdn.net/weixin_43347550/article/details/105936844