[John Marshall] >>> For strings of > 1 character, what are the chances >>> that hash(st) and hash(st[::-1]) would return the >>> same value?
[Tim Peters] >> First, if `st` is a string, `st[::-1]` is a list. Do you really mean >> to compare string hashes with list hashes here? I'm going to assume >> not. [Jeff Epler] > It is? > > >>> st = "french frogs" > >>> st[::-1] > 'sgorf hcnerf' > > (Python 2.3) Indeed that's right. Python 2.4+ also. My apologies! Good thing it doesn't matter to the rest of the exposition ;-) -- http://mail.python.org/mailman/listinfo/python-list