Python How to Create Read Only Dictionary

preview_player
Показать описание
Python How to Create Read Only Dictionary readonly
from types import MappingProxyType
data = MappingProxyType({'name': 'sam', 'age': 20})
data['name']
TypeError: 'mappingproxy' object does not support item assignment

Please Like this Page to get Latest Python, Machine Learning and Artificial intelligence Tutorials

If you enjoy these videos and would like to support my channel, I would greatly appreciate any assistance.
Рекомендации по теме
welcome to shbcf.ru