CBSE Class 11 Computer Science Question 48 of 88

Tuples and Dictionary — Question 13

Back to all questions
13
Question

Question 12(b)

Find errors and rewrite the same after correcting the following code:

d1(9) = 90 
Answer

In Python, we assign the key-value pair using square brackets [], not parentheses ().

The corrected code is:

d1[9] = 90