mardi 4 août 2015

hash() in Python [duplicate]

This question already has an answer here:

How does hash function works in Python? Why is hash('\0b') = hash('\0\0c') even though '\0b' is not equal to '\0\0c'?

>>>print hash('\0b') == hash('\0\0c')
True
>>>print hash('\0b'),hash('\0\0c'),hash('\0\0\0d'),hash('\0\0\0\0e')
96 96 96 96



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire