18
Question Question 13(a)
Predict the output
a = {(1,2):1,(2,3):2}
print(a[1,2])Output
1
Explanation
a is a dictionary containing two key-value pair.(1,2) is a key of a. Therefore, a[1,2] represents value of key 1,2 i.e.,1
Predict the output
a = {(1,2):1,(2,3):2}
print(a[1,2])1
a is a dictionary containing two key-value pair.(1,2) is a key of a. Therefore, a[1,2] represents value of key 1,2 i.e.,1