Computer Science, asked by velishalaupender63, 5 months ago

Predict the output of following code snippet

dict1={}

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

dict1[(6,2,5)]=3

dict1[(1,2)]=2

sum=0

for i in dict1:

sum+=dict1[i]

print(sum)

print(dict1)

2

Answers

Answered by rajaram600068
0

Answer:

Predict the output of following code snippet

dict1={}

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

dict1[(6,2,5)]=3

dict1[(1,2)]=2

sum=0

for i in dict1:

sum+=dict1[i]

print(sum)

print(dict1)

2

Answered by pavithranatarajan855
1

Answer:

Output:

15                                                                                                                            

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

Similar questions