hash()

John Marshall John.Marshall at ec.gc.ca
Mon Dec 5 13:22:24 EST 2005


Scott David Daniels wrote:
> John Marshall wrote:
> 
>>For strings of > 1 character, what are the chances
>>that hash(st) and hash(st[::-1]) would return the
>>same value?
> 
> 
> Why not grab a dictionary and do the stats yourself?

I was actually interested in the mathematical/probability
side rather than the empirical w/r to the current
hash function in python. Although I imagine I could do
a brute force test for x-character strings.

John



More information about the Python-list mailing list