Q: Doing simple comparison in dictionary with Python import hashlib
import csv
with open ('C:\Python\Test\Hash.csv') as hash_file:
    # file_reader = csv.DictReader(hash_file)
    file_reader = csv.reader(hash_file)
    # counter = 0
    mydict = dict(filter(None,csv.reader(hash_file)))
    for i in range(1000,10000):
        bank_of_hash = hashlib.sha256(str(i).encode()).hexdigest()
        bank_of_hash={i:bank_of_hash}
    for counter in range(1,11):
        # counter +=1
        if mydict.values() == bank_of_hash.values():     
           print("This is your %s hash and this is the $a your decode" %(i,row))
        else:
            print("Password Not Found!!!")

Hi everyone, first of all, thank you for helping me. Second, it is so simple I don't know why it doesn't work.
1-I import the libraries.
2-opened it as hash_file
3-Here is my hash.csv file


*

*Jadi,9553627933b214db60798fe40d2b4f8497781d024f53d62dc1b12469b7d53784
Jafar,58763bceaddcad6777063dd590cb8e50211b6bb7a11272110fef4060142ded20
Jobra,08f88745513481cad0adf1ae0b225d6167ec690c2bc6d38558cb8ae399ce3bdb
Peter,99b057c8e3461b97f8d6c461338cf664bc84706b9cc2812daaebf210ea1b9974
Noroozi,996d7e2bc68410d18cf83438acaf9f8c81db7f7e4dd1c1116b52a1da57beaee3
Sam,d70ada757917455ce5a436e921854e35871e9e368050c3681c94ca9435c71c66
MahdimRa,1076c5957d3ea9ffad332d1a3785b90bc658dab676c9ba822c8fe55a3e6c23b4
Saghi,2876370ec5a463a2b84a7512e3dae1229460b5fe6c31b83ffabf2be977f7247b
Navid,85432a9890aa5071733459b423ab2aff9f085f56ddfdb26c8fae0c2a04dce84c


4- I read the CSV file then I converted into a dictionary
5- I know my hashes are from 1000-10000
6- Made a dictionary of hashes with keys and values
7-I the only thing I want to do is a simple comparison between two dictionaries.

A: I've tried to run your code but couldn't parse the data from hash file to dictionary, so I modified the code to this and worked:
import hashlib

hash_data = dict()

with open ('C:\Python\Test\Hash.csv') as hash_file:
    for line in hash_file.read().split():
        hash_data[line.split(',')[0]] = line.split(',')[1]

for i in range(1000,10000):
    bank_of_hash = hashlib.sha256(str(i).encode()).hexdigest()

    for key in hash_data:
        if hash_data[key] == bank_of_hash:
            print(key, ':', i)

