Dictionaries in Python

Python Dictionaries

Dictionaries hold key-value pairs which are known as items. SYNTAX : dictionary_name = { key_1 : value_1, key_N : value_N} Empty dictionary dictionary_name = {} To access items from the dictionary dictionary_name[ key ] Example : To Replace a value in Dictionary Add new item in dictionary Remove items from dictionary: use del keyword Accessing… Read More