0
Are all hashable data types in python with unique elements?
I am trying to mark out the difference between various data types to determine which one uses hash values at the backend. Please clarify. Thanks.
1 Réponse
+ 1
Hashable data types: int, float, str, tuple, and NoneType.
Unhashable data types: dict, list, and set.
Unhashable data types are all mutable in nature, while these five hashable data types are all immutable
references : hope it helps.. ..
https://betterprogramming.pub/3-essential-questions-about-hashable-in-JUMP_LINK__&&__python__&&__JUMP_LINK-33e981042bcb
https://realpython.com/lessons/immutable-vs-hashable/#t=23.7
https://www.geeksforgeeks.org/why-and-how-are-python-functions-hashable/amp/