0

hello to everyone who teaches Python, I want to know what a hash is?

recently stuck hash, hashable class or hashable method, etc. I can not understand the essence specifically, it is possible, using an example, to deprive it concretely on Python. Thanks guys.

23rd Mar 2021, 11:59 AM
Aid
Aid - avatar
1 Odpowiedź
0
It is a way to transform data to relativt numbers, that you can use for example to index an array: X -> f(X) -> n. Compare with the keys in a Python dictionary, where n should be uniqe. It makes it more easy (faster) to find the values, that is good when you have a lot of data to deal with.
23rd Mar 2021, 12:33 PM
Per Bratthammar
Per Bratthammar - avatar