Python_program 11

 Practical Name:  Write a python program for built-in function of dictionary.

_______________________________________________________________

Program :

Friends = {1: "sakshi", 2: "muskan", 3: "samrudhi", 4: "suhana"}

print("\nPrint Dictionary :",Friends)

print("Access Element By key :",Friends[1])

del Friends[2]

print("Remove Element By key :",Friends)

print("Length of Dictionary : ", len(Friends))

 

 

 

Output: 



Post a Comment

Previous Post Next Post