<jupyter_start><jupyter_text>DictionariesIt store data/value with flag or key. Dictionary is initialize with my_dict = {} it can be empty. if we want add value with own.my_dict = {1:'shahin' , 2:'swarna' , 3:'tanvir', 4:'pial'}my_dict = {'key':'jhon', 1:[2,3,4]} key/flag can be string/character/number.my_dict = dict([(1,'apple'),(2,'ball')]) from sequence having each item as a pair() -> Tuples{} -> Dictionaries[] -> Lists  Concatenation<jupyter_code>my_dict = {2:'swarna', 1:'shahin', 3:'pial'}
print(my_dict)
my_dict.update({3:'pilu'})
print(my_dict)<jupyter_output>{2: 'swarna', 1: 'shahin', 3: 'pial'}
{2: 'swarna', 1: 'shahin', 3: 'pilu'}<jupyter_text>Repeatation<jupyter_code>print(my_dict*2) # Repeatation is not possible in this way<jupyter_output><empty_output><jupyter_text>Slicing<jupyter_code>print(my_dict[2])
print(my_dict[-1]) # it shows error<jupyter_output><empty_output><jupyter_text>Built In Function of Dictionary<jupyter_code>my_dict = {2:'swarna', 1:'shahin', 3:'pial'}
print(len(my_dict))
my_dict2 = my_dict.copy() # copy total dictionary element in other dictiontary
my_dict.clear()           # delete all element from dictionary
print(my_dict2)
print(my_dict)
print(my_dict2.values()) # values of Dictionary
print(my_dict2.keys())   # keyes of Dictionary
print(sorted(my_dict2))  
print(my_dict2.items())  # show the total item
print(my_dict2.get(1))
print(my_dict2.update({4:'jahid'}))
print(my_dict2.pop(4))  # remove the key and value
print(my_dict2)
print(my_dict2)
print(my_dict2)<jupyter_output>3
{2: 'swarna', 1: 'shahin', 3: 'pial'}
{}
dict_values(['swarna', 'shahin', 'pial'])
dict_keys([2, 1, 3])
[1, 2, 3]
dict_items([(2, 'swarna'), (1, 'shahin'), (3, 'pial')])
shahin
None
jahid
{2: 'swarna', 1: 'shahin', 3: 'pial'}
{2: 'swarna', 1: 'shahin', 3: 'pial'}
{2: 'swarna', 1: 'shahin', 3: 'pial'}