Only immutable data types can be used as keys for dictionaries in Python. True or False?
Explanation
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.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Python
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести