摘要:
假设有关键字存放在text.txt文件中,当用户输入文件中包含的敏感字时,则用星号*替换例如:用户输入“西安我的故乡”时,则显示为“**我的故乡”代码;word_filter = set() #建立的是个集合,去除重复项with open("test.txt","r") as f: for w in f.readlines(): word_filter.add(w.strip... 阅读全文
摘要:
题目:使用python生成类似于下图的字母验证码图片实现代码:from PIL import Image,ImageFont,ImageDraw,ImageFilterimport random#随机字母def randChar(): return chr(random.randint(65,90))#随机颜色1def randColor(): return (random.randi... 阅读全文