# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

#  ## how to create a dictionary and update and insert

d={}
d[24]=34
d["str"]=345
print(d)
d={23:34,"str1":344}
d[23]=36
print(d)

# ## how to iterate over a dictionary

for i in d:
    print(i,end=":")
    print(d[i])
del d[23]

# ## Common functions in dictionaries

d1={}
d1[2]=1
d2={}
d2[2]=1
print(d1==d2)
print(len(d1))
d1.clear()
print(d1)
print(d2.keys())
print(d2.values())
print(23 in d2)

StarcoderdataJupyterScriptsDedupFiltered