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
Зарегистрируйся сейчас
или Подпишись на будущие тесты