import hashlib START = 'bgvyzdsv' trouve = False n = 0 while not trouve: n += 1 hash = hashlib.md5((START + str(n)).encode()) if hash.hexdigest().startswith('000000'): trouve = True print(n)