#dictionary in python L10
market ={"burger":"it is round with cheezy and tasty","pizza":"it is made up of roti shape bun","biryani":"indian most favourite dish which is use in all happy moment","rice":{"golden rice":"also known as poor basmati bcoz of low cost and high nutritients","basmati rice":"this rice only have 8 variety in india and is most loved rice all over world","ukhra rice":"this rice is broken in shape"}}
#print(market)
print(market["pizza"]) #it will place pizza value
print(market("rice"["biryani"])) #not showing result
market ["faizan"] = "user of python" #this will add info to market
print(market)
del market["faizan"] #this will delete the grp
print(market)
market2 = market.copy()
del market2["burger"]
print(market)
print(market2)
#market.update({"leena":"toffee"}) #to add use {""} in the sentence
#print(market)
#print(market.keys())
#print(market.get["burger"]) #dont get the result
print(market.items()) #all items will be displayed
#search google dictionary functions python
Comments
Post a Comment