Dictionary in Python

 






mydict= {
"kartik":" hero",
'EkOr' : {'kartik' : 'Codeeer'},
"laptop":"An electronic device",
"dog":"An animal"
}


print(mydict)
Updatedict= {
"Mobile ":"A smart phone device",
"dog":"A Human"
}
mydict.update(Updatedict) # .update will update dictonary
print(mydict)

print(mydict["dog"])

Comments

Popular posts from this blog

React Installation with Vite and Tailwind css (Steps to Installation)

Insert Data In mongoDb

Class methods as an alternative Constructor