def bad_hash(key): hash = 0 for c in key: c_int = ord(c) hash_partial = hmap[c_int] ^ c_int hash ^= hash_partial # print(f"{c} : {hash_partial} : {hash}") return hash