Computer Science, asked by puttaabi18, 6 months ago

dict 1 = {
dict 1(1,5,6)] = 10
dict 1 [86,2,5)]-3
dict [(1,2)] = 2
sum=0
for i in dict1[i]
print (sum)
print (dict 1)​

Answers

Answered by pavithranatarajan855
2

Answer:

PROGRAM:

dict1={}

dict1[(1,5,6)] = 10

dict1 [(86,2,5)]=-3

dict1 [(1,2)] = 2

sum=0

for i in dict1.values():

   sum=sum+i

print (sum)

print (dict1)

OUTPUT:

9                                                                                                                              

{(86, 2, 5): -3, (1, 2): 2, (1, 5, 6): 10}

Explanation:

Similar questions