import hashlib
with open("common.txt", "r") as f:
    f = f.readlines()
print(f)
with open("hashes.txt", "r") as e:
    e = e.readlines()
print(e)
print("\n")
print(e)
print("\n")
for password in f:
    h = hashlib.new("SHA256")
    h.update(password.encode())
    password = h.hexdigest()
    print(h.hexdigest())
   
for line in f,e:
    if e == f:
       print("hash found")
    else:
        print("error")
I am not sure how to check if a hash is found between the two text files I am comparing. I used this approach but that did not work.
 
    