Only immut ...
Site Language: English
Terms and Conditions
Only immutable data types can be used as keys for dictionaries in Python. True or False?
Any hashable object can be used as dictionary key, Immutable data types are subset of all hashable objects, but this relation is not exhaustive. For example, you can define your own class with a __hash__ method in it and use it as a dictionary key.
Login to learn Python
Read more about
Consider following code: $var = 1 + "-1.3e3"; echo $va...
Consider following code snippet: print_r("Hello World", t...
Consider following code snippet: $a = 3; $b = '3'; if ($a...
Sign Up Now
Subscribe for future quizzes