Dictionary & Its Functions Explained

Code file as described in the video

# Dictionary is nothing but key value pairs
d1 = {}
# print(type(d1))
d2 = {"Harry":"Burger",
      "Rohan":"Fish",
      "SkillF":"Roti",
      "Shubham":{"B":"maggie", "L":"roti", "D":"Chicken"}}
# d2["Ankit"] = "Junk Food"
# d2[420] = "Kebabs"
# print(d2)
# del d2[420]
# print(d2["Shubham"])
# d3 = d2.copy()
# del d3["Harry"]
# d2.update({"Leena":"Toffee"})
# print(d2.keys())
# print(d2.items())


Comments(2)

kunwarrahul at 2019-06-23 09:30:09 says
thnks bro for providing us python tutorials
anshul860 at 2019-06-23 09:30:09 says
print("Select any word to get its meaning\n", "1) Abandoned\n", "2) Plethora\n", "3) Imbibe\n", "4) Inculcate\n") Dic1 = {"Abandoned":{"deserted", "forsaken", "cast aside/off", "jilted", "stranded", "rejected"}, "Plethora":"excess", "abundance", "overabundance", "superfluity", "surfeit", "Imbibe": "drink", "consume", "sup", "sip", "quaff", "swallow", "down", "guzzle", "Inculcate": "instil", "implant", "fix", "ingrain", "infuse", "impress", "imprint"} Print(Dic1) I am unable to run this it's showing error