Question: What is output? my _ dict = { ' AA ' : 3 , ' BB ' : 2 , ' CC ' : 1

What is output?
my_dict ={'AA':3,'BB': 2,'CC':1,'DD':0}
v1= list(my_dict.keys())[list(my_dict.values()).index(1)]
v2={v:k for k, v in my_dict.items()}[0]
print(v1,v2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!