0 votes
96 views
in Computer Science by (8.5k points)
If my_dict is a dictionary as defined below, then which of the following statements will raise an exception?

my_dict = {'apple': 10, 'banana': 20, 'orange': 30}

(A) my_dict.get('orange')

(B) print(my_dict['apple', 'banana'])

(C) my_dict['apple']=20

(D) print(str(my_dict))

1 Answer

0 votes
by (56.5k points)
 
Best answer

Correct option is (B) print(my_dict['apple', 'banana'])

...