🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

निम्नलिखित में से कौन शब्दकोश में key=”tiger” के लिए कुंजी-मान को हटा देगा?

Which of the following will delete key-value pair for key=”tiger” in dictionary ?

dic={“lion”:”wild”,”tiger”:”wild”,”cat”:”domestic”,“dog”.”domestic”}
A)
B)
C)
D)

Explanation:

To delete the key-value pair for "tiger" in the dictionary, you use the del statement:

del dic["tiger"]

This removes the key "tiger" and its value from the dictionary.

Correct answer: (A) del dic["tiger"].

Latest Updates