Which of the following will raise an error if the
given key is not found in the dictionary?
(a) del statement to pop()
(c) getitem() (d) all of these
Answers
Answered by
13
Answer:
( d ) all of these............
boss1810:
please tell are you sure
Answered by
2
All of these.
Explanation:
keys() is used to go back a listing of dictionary keys.
Call dict. keys() is used to go back to an iterable containing the keys of the dictionary .
One can use listing() to transform this iterable to a listing.
One can use the pop() technique to cast off the important thing from the dictionary.
del is likewise used to cast off keys from the dictionary.
The pop() technique accepts a key call as a controversy whereas “del” accepts a dictionary object after the del keyword.
One can use the get() technique of the dictionary item dictionary to get any default cost without elevating mistakes if the important thing does now no longer exist.
Similar questions