Is there a hash algorithm/function in Python that is able to convert sets of unique strings to a single hash string?
For example, a set of {a,b,c} would return some unique ID, the same unique ID as for {c,a,b} or {b,c,a} etc.
Is there a hash algorithm/function in Python that is able to convert sets of unique strings to a single hash string?
For example, a set of {a,b,c} would return some unique ID, the same unique ID as for {c,a,b} or {b,c,a} etc.
Copyright © 2021 Jogjafile Inc.
There is the builtin hash function for this purpose. Two frozensets containing the same values are guaranteed to have the same hash.