import re import PyPDF2 with open('Python_Tricks_encrypted.pdf', 'rb') as pdf_file_stream: reader = PyPDF2.PdfFileReader(pdf_file_stream) with open('dictionary.txt', 'r') as txt_file_stream: file_iter = iter(lambda: txt_file_stream.readline(), '') for word in file_iter: word = re.sub(r'\s', '', word) if reader.decrypt(word): print(word) break
初级程序员
by: ccccio 发表于:2022-04-04 14:02:24 顶(1) | 踩(0) 回复
求注释
网友回复
回复Python自学 : 哈哈
顶(0) 踩(0) 2022-06-01 02:12:18
回复评论