I am trying to compute the hash function for a string and I am receiving a syntax error about how to convert a character at position x to an integer value. Anyone know how to correctly do this?
def hashFunction(inputString, r, m):
for x in range(0,len(inputString)-1):
hashValue = (hashValue*r+(ord)inputString[x])% m
return hashValue