Dictionary in Python

Source code :

mydict ={1:"yellow",2:"blue",3:"white"}
print("access dictonary:",mydict[3])
print("my dictonary length is:",len(mydict))
print("keyvalue:",mydict.values())

Output :

access dictonary :white
my dictonary length is: 3
keyvalue dict_values:(['yellow', 'blue', 'white'])

Output :


                

Comments :